Why are my agents not following their paths at all?

I’m using a grid graph with AIPath, RVOController, Alternative Path Modifier, and Simple Smooth Modifier and my guys are wandering all over the place, especially at high speeds. Here’s a video of the problem


All I’m looking for is for my guys to walk on clean paths, to avoid each other, and to not use the exact same path as nearby guys. The paths in the gizmos view look pretty good, but the guys aren’t sticking to it at all. This setup was working OK at slower game speeds, but when I turn up the game speed it gets really bad.

Hi @aron_granberg, do you think you could take a quick look? I’ve fiddled with a lot of parameters but can’t seem to isolate the source of the problem.

Is my post buggy or something? This guy responding to every single person here except my thread…

Hi

I’m currently going through a bunch of threads to answer everyone.

In your case, try to increase the Pick Next Waypoint Distance a bit. The agents likely get off-track, and then spend a lot of time trying to get back to where they were.

1 Like

Thanks for that, Aron, didn’t mean to be pushy. Tweaking pickNextWaypointDistance was helpful for controlling at different speeds, however it was actually the AlternativePathModifier randomStep that was causing chaos. I bumped it from 10 to 30 and got instantly better results.

Does it make sense that I should be scaling pickNextWaypointDistance linearly with maxSpeed? They don’t already compensate in the engine?

Not quite. If the agent has a higher speed, it will also have a harder time following a path very precisely (due to acceleration, limited fps, etc.), so a higher pickNextWaypointDistance can be necessary.

1 Like