RVO pathing problem


We’re using the RVO system on a spherical surface for our game (we took the code from the beta version of the plugin), and it’s working quite nicely, but we have one issue.

Namely, it looks like stationary agents are pushed away when they avoid a moving one, without generating a path, and they only generate one when they have to go back.

This is a problem for us because agents have no movement animation when they’re pushed away - our walking animation only plays if the agent has a path and can move.

Is there any way to tell when an agent is pushed via RVO, or is there a cleaner approach to animating movement in this case?

Thanks in advance.


If you are using a built in script such as RichAI or AIPath then you can access the velocity parameter to see if it is moving.

Another property that might be interesting is: desiredVelocity

1 Like

Thank you for the quick response.

Yes, I’m using a script derived from AIPathAlignedToSurface so I have access to the velocity parameter but I was wondering: how does the RVO ensures that the agent will not be pushed into a wall or other objects if he is not using a path in order to avoid another agent (in our game there are no colliders, only triggers)

RVO does not ensure that.
However the AIPath script has an option called ‘constrain inside graph’ which will ensure that and also communicate to the RVO system if it has collided with a wall.

That should solve my problem, thank you! :smiley:

I’m sorry to bother you again.

Unfortunately I can’t use the “constrainInsideGraph” because my graph is “on point graphs” type. Is there any other way i could ensure that the RVO will not push my agents inside walls and unwalkable places?

Ah. Well, I suppose you could always use normal unity physics for that. It may not interact as nicely with the RVO system though (other agents may think that it can pass through the wall, and thus push against the character harder than they should).