RVO stuck problem

I am tring to integrate the RVO part of the project into my game. The game is an ARPG kind game, I want the monsters could avoid each other when moving.
I found the RVOAgent will get stuck in the situation which showed in the picture. The moving agent wants to go to the target position, the locked agent is in the way. There are wall obstalecs beside the locked agent. Sometimes the moving agent will go across the locked agent from left side, but sometimes it will go to the right side, which get itself stucked (I am using CharacterController to avoid wall pentration).

​<img src="/uploads/default/original/1X/305e6917e37b01f0c11b9ae50eb48c35908b084d.jpg" width="365" height="467">

I was thinking the wall force of the RVOController.cs (line 257-277) will solve the problem, but I digged into the code, find the rvoAgent.NeighbourObstacles is always null which leads to no wall force on agent.
So I got stuck and do not know how to solve the problem. The locked agent needs to be locked since I do not want it to be pushed away when it is not moving (maybe it is casting skill or doing other things). I am wondering, whether the stucked situation is a normal result of RVO algorithm? If it is, is there any way to solve this problem?

Hi

Local avoidance is really local avoidance. Meaning it will try to pick what looks best right now. That might lead it into a local minima which it cannot get out of (e.g getting stuck between a locked agent and a wall), but there is not much it can do about it without more global methods such as pathfinding unfortunately.

Enabling locking of agents should be seen as a last restort. It is usually better to update the graph when a new obstacle is added or allow agents to move to let other agents through.

thanks very much~ :smile:
it seems update the position of locked agents(as an obstalce) in grid-based pathfinding is a better way to sovle the problem

by the way, do you think it is possible to realize one-way wall using navmesh?

Hi

Out of the box, no. You can do it with some graph updates by script though.