RVO Controller does not work when agents are not the same height

As the title say, I’ve noticed that when agents are not on the same or close height - they local avoidance does not work correctly.
Example when they are not on the same height:


And when I move them on the same height:

I’ve tried several configurations(height/center/radius) but not seems to matter in this case.

Also the second issue I’ve came across is that when the FPS are really low, the characters seem to move really weird: Example:

Anyone know how to fix these issues?

That’s odd.
Do you think you could show a screenshot of the agent’s heights in the scene view (should be visible as yellow cylinders).

As for the second issue. That’s because it is overshooting, it tries to move to a point on the path, but the FPS is too low so it moves further than it intended and ends up on the other side of the path, at which point it tries to move in the other direction etc. The effect is exaggerated by RVO which introduces a 1-frame delay in the movement (make sure you have double buffering disabled as that otherwise increases the delay to 2 frames). This is usually to be expected if you have a very low FPS.
Are you using the AIPath script with the beta version? If so, you can fix the issue by opening the AIPath.cs script and adding this line

velocity2D = Vector2.ClampMagnitude(velocity2D, pickNextWaypointDist / (Time.deltaTime + 0.0001f));

right before the call to

MovementUtilities.ClampVelocity

(around line 254).

This will prevent it from moving too quickly (I think it should work anyway), however it will result in that if you have a very low FPS, then your characters will be forced to move slower than they normally would.

Here’s the screenshot you’ve wanted to see:

Thanks for such a quick answer, although I’m sorry to inform you that the fix you suggested did not work :frowning:

Hm… Ok. Try changing it to

velocity2D = Vector2.ClampMagnitude(velocity2D, pickNextWaypointDist / (2 * Time.deltaTime + 0.0001f));

Ok. That’s a little bit better. Thanks. Do you have any ideas about the first issue?

Ohh. The problem is not in height - they behave this way untill they are moved in any way(If I move them in scene in any direction, they start to work properly)

Edit.
Gosh, sorry for that. My colleague messed some of core AIBase Code, that’s why that did not work. Thank you for your hard work!

Ok. Great that it is working now at least :slight_smile: