RVO Controller not avoiding other agents

I’m setting up some basic navigation in a new project and am trying to get some local avoidance on a couple agents. I created an agent and a simple controller to send it to a list of waypoints, but the agent patrolling waypoints gets stuck on another stopped agent. Below is a screenshot of the issue:

You can see that the moving agent (bottom zombie) has a path that moves through the the stopped agent. When it reaches the stopped agent, it stops at the edge of the RVOController radius instead of finding a path around it. Here is the component setup on the agents:

Both agents have the same setup. The moving agent uses GuardAI to select waypoints to send the agent to.

Is there something I’m missing in the setup for these agents that would solve this issue, or is this normal behavior?

Hi

Does it completely stop or does it eventually move around it?

In the current version avoidance around agents that are locked (I assume what you mean by ‘stopped’ is that you have set the ‘locked’ property to true on the RVOController) is not that good (I have some improvements for that in the pipeline though) however it should still eventually manage to move around the other agent.

Note that local avoidance does not affect pathfinding at all, they are completely separate.

It completely stops. Or probably more specifically, its still moving but so little that it looks stopped. It never moves around the agent though.

By the way, by stopped I was just referring to the agent not having a target position to move to. With this setup though it should lock the agent according to the RVOController settings.

It’s good to know that local avoidance doesn’t affect pathfinding. As a workaround to this, would you suggest adding agents to the collision testing mask on the grid graph and updating it at some interval?

Ok. As a first workaround, try to make sure the other agent is not locked. Locking is not part of the original RVO algorithm and while it is useful in some scenarios, it does significantly reduce the local avoidance quality.

If you want it to be locked however, you can try to download a beta version that I have. Take a look at https://www.arongranberg.com/astar/download, click on the ‘Show older versions’ button and then download the latest beta on the RTS branch. That includes some code which makes agents move around locked agents much better.

Including agents in the collision mask on graphs is usually a bad idea. Firstly this will make the agents try to avoid themselves, but it is also usually not precise enough.

1 Like

I had the same issue, my problem was in setting of ‘pick next waypoint’, which was too small for agent to be able to move around another not moving agent.

i see that it may not help you, but maybe it would e helpful for anyone else searching for solution