Hi. We have a major issue with RVO Agents getting stuck on each other and on static RVO Obstacles when using FunnelModifier. The issue seems to go away when FunnelModifier is disabled. This may be just for this case but may also be related to some sort of a bug.
We are using RecastGraphs and version 4.2.17.
We have tried to change agent time horizon, obstacle time horizon, RVOController radius, RVO Example Agent repath rate, move next dist, slowdown distance with no luck.
Any ideas on how to fix this? Thanks.
RVO has no effect on pathfinding (including the funnel modifier) whatsoever.
You may want to try the beta version, avoidance of locked RVO agents has been much improved there. See A* Pathfinding Project
Unfortunately we cannot use the latest beta since it is dependent on Burst 1.7.2 which is not available on Unity 2021.2. We are stuck on that Unity version because of some other 3rd party assets (for example UniStorm).
Unity 2021.2 supports Burst 1.6.6. Could you lower the minimum requirement to that?
We are getting at least the following errors:
AstarPathfindingProject\Core\RVO\RVOQuadtreeBurst.cs(46,7): Burst error BC1022: Accessing a managed array is not supported
AstarPathfindingProject\Core\RVO\RVOQuadtreeBurst.cs(46,7): Burst error BC1360: A static constructor on type `Pathfinding.RVO.RVOQuadtreeBurst` is mixing managed and unmanaged code which is not supported. In order to solve this, please move the managed code or unmanaged code to a different class/struct
EDIT: Wait, what… I think I am able to update Burst by using the direct package name (com.unity.burst). Will update this soon.
Okay I was able to update Burst to a supported version but unfortunately the RVO updates in the beta do not solve our issue.
In our game, we have a situation at a shooting range where 25 NPCs stand near a wall in a row (and are locked) and then one NPC is walking past them. The walking NPC still gets stuck into those locked NPCs and he is not able to dodge them. Unfortunately it seems like the RVO system needs more improvement.
Do you have a screenshot of this?
To be honest, the image could be better but we already spent couple of hours changing (creating a workaround to) the scripted sequence so that the bug does not occur anymore. This picture was taken before the fix.
The rightmost guy should go past the other NPCs from the left but he tries to walk right towards the wall. We also set the “right passing offset” to zero from the RVOSimulator with no luck.
Ah, yeah I expected as much. It’s a known limitation. The local avoidance system will not take into account things like walls when it decides which side to pass a locked agent on.
If the locked agents are more like fixed obstacles it might be better to add a navmesh cut component to them.
Thanks. Those locked agents are fixed obstacles at this point, yes. But of course they will be moving after the “cutscene” again. Can we use navmesh cut component on moving agents as well or just for the locked ones? And is it okay to disable the component when the agents are moving to preserve CPU?
A navmesh cut cannot be used on a moving agent. Since it cuts away the navmesh underneath it, the pathfinding system will be very confused when it tries to calculate a path.
The navmesh cut component can be disabled/enabled at any time.
Navmesh cuts may be a viable option for us in these kind of situations. I’ll keep that in mind for the future. Thank you very much