RichAI movement speed depends on FPS?

I’m using RichAI to move an agent, by setting the maxSpeed and destination.

When measuring the actual speed with which the agents moves, I noticed something weird:
the speed seems to depend on the game’s current FPS.

Is that really how it’s supposed to work?

If I set the max speed to 2, then the agent will move with a speed close to this value (around 1.8) at 40 fps.

However, when the game runs at 20 fps, then the actual measured speed is more like 1.2.

Removing the RigidBody from the agent fixed the problem.

Since RichAI’s movement code works differently, depending on if there is a RigidBody attached or not, I suspect there is a bug or problem in RichAI’s physics movement code.

Hi

How exactly are you measuring the speed?

Just calculating it between fixed times.

But it is not a measuring problem, since you can visually even see it in game:

  • At 40 fps, the agent moves fast.
  • At 20 fps, it moves around 25% slower.

As soon as I remove the RigidBody from the agent (even while game is running), the speed
increased to nearly exactly the maxSpeed that was set.