I got two problems when using RVOController to achieve group movement:
Units are entering restricted/unwalkable areas. They seem to be moving into regions marked as unwalkable in my 2D Grid graph.
Inconsistent movement on first click. In my test scene, when I click to move the group, only some units respond and start moving on the first click. The remaining units only move after I issue a second click(or trigger new path calculation somehow).
I suspect these issues stem from RVO’s nature of focusing on local avoidance without sufficient consideration for the global goal. These seem like common challenges with RVO, but I couldn’t find solutions for them in the Local Avoidance documentation.
How should I approach solving these two specific problems? If extending the core RVO or agent logic is necessary, I would like to know where to start
Thanks
So you’re right about this stemming from it being “local avoidance” but I’m not really sure how you’d get around this besides having a physical collider or obstacle to keep them from doing this. I’m not sure how much stopping them from touching unwalkable area is within the scope of RVO. Does using an obstacle work in your situation at all?
Are your units ever locked/have locked when not moving enabled?
just in case anyone come across same problem, I found both problem could be solved by adjusting built-in parameters
problem 1:
tick RVOSimulator ‘useNavmeshAsObstacle’ + AIPath ‘constrainInsideGraph’
so that every frame(performance overhead of course) the agent final position is corrected by checking nearest walkable node
this is actually well documented in API docs: AIPath - A* Pathfinding Project
problem 2:
some agents not moving because this line of code think agent should stop because it is too crowded around destination area
though I don’t understand why the conclusion because the destination area looks not crowed at all(see my gif)
anyway, I think my game doesnot need this feature so I turn it off the problem solved.