Agents doing zigzag when FPS is low

Hi. Another issue that we have is that our agents start behaving very bad when FPS is low. They seem to ignore colliders, walls, navmesh gaps etc when the FPS is low.

Gizmos show a straight path that they should follow but they don’t follow that path. Instead they go in zig zag along the path. This looks really bad and slows down their movement significantly.

Movement seems okay when FPS is back to normal (i.e. 30-60 fps).

We are using RVO Example Agent + RVO Controller with Funnel Modifier & Recast Graph.

We are using the LATEST BETA. But I believe this happens on every version since we’ve had this issue for some time already.

What can we do? Thanks.

EDIT: By default our Move Next Dist (for RVO Example Agent) is around 0.5. If we switch this to 5 (10x) when the FPS is around 5 (~10% of the target FPS), we get decent movement again but then the NPC tries to go through walls. Is this a bug in Astar code or wanted behaviour? Are we supposed to update the Move Next Dist value depending on the FPS…? We simply cannot change it to any bigger value to prevent cutting through walls.

And with large MoveNextDist value the NPCs try to cut through walls… You can see that the path is correct but the NPC does not respect the path…


Here you can see the NPC agent doing zig zag when using a “normal” MoveNextDist of around 0.5f. Please let us know how to fix this. This issue is urgent since our game release is soon. Thanks.

PS: I added this same video to the first message as well.


I would not recommend using the RVOExampleAgent in production. It’s a very simple script designed to show how to integrate with an RVOController. But other movement scripts will be much more robust.

See Movement scripts - A* Pathfinding Project