RichAi component Velocity2D error

Hey.

So, i had this problem where my NPC would be unable to move backward after hours and hours of testing i found that the following line was forcing the character to rotate before moving to the transform point:

velocity2D = MovementUtilities.ClampVelocity(velocity2D, maxSpeed, slowdownFactor, slowWhenNotFacingTarget, movementPlane.ToPlane(rotationIn2D ? tr.up : tr.forward));

Now commenting this line out seemed to do the trick but now i am worried that this will cause unforeseen problems in the future?

The line is in RichAi.cs line 453.

I would also like to know why this happens?

Hi

Have you tried turning off the setting ‘slowWhenNotFacingTarget’? When that setting is enabled it will make the AI slow down unless it is facing the direction it wants to move in.