AI Velocity and framerate issue

Hello.

I just bought this package and I’m porting the Unity’s navigation into this one.
However, I noticed that the RichAI agent’s velocity keeps jumping back and forth between the maxSpeed I set and twice the max. So for instance, each frame it jumps between 3.3 and 6.6.
I suspect this has something to do with the framerate, because when I click the STEP button on unity to run a single frame at a time, the agent’s velocity is suddently fixed.
My test map runs roughly at 30 FPS.

Is this a known issue? Is there a workaround this?

Thank you in advance.

image

I found out the problem. It looks like the rigidbody attached to the character (even though it’s in kinematic state) was influencing the agent’s velocity. I removed the rigidbody altogether and it now respects the max speed.

1 Like