2D RVO not working for Y movement

Hello A* Pathfinding community!

I have been testing the RVO in 2D and it mostly works. It moves perfectly along the X, but it does not move at all along the Y. It will move just fine along the X however. With the image below, I am using a Grid Graph. The green square is the RVO agent that is moving. The white square is an obstacle. The green agent does NOT avoid the white obstacle.

I feel as if I’m really close to getting this fully working. Does anybody have any suggestions or have experienced this problem?

Thank you very much!


Are you using the RVO beta version? The latest (non-beta) version does not have support for RVO in the XY space, only in the XZ space.

Your white obstacle does not seem to be detected as an obstacle by the grid graph. Make sure it has a collider and a layer that is included in the Collision Testing mask in the grid graph settings.

Hello Aron,

Thank you for the reply! I am indeed using beta. Sorry, I should have mentioned that previously. Also, update on this one, I ended up getting the y movement working (I had to comment out a line of code that was setting the waypoint y position to the transform position, picture below).

However, I am running into a separate issue now, the agents will not run into obstacles.

Now that I have the Y movement working, I now have two agents that avoid each other beautifully, I mean the 2D local avoidance is simply gorgeous.

And yes, I did not put the white obstacle in the right layer. It is detected by the grid graph now, but I am running into a new issue. The agents completely ignore the obstacles. Even when I added a penalty, they simply move right through the obstacle.

Any idea why this might be happening? Once this is fixed, local avoidance will be in.

Thank you!

that’s not the only change you need to the AIPath script. I did manage to have the agents work correctly following the path, but they do cut corners ignoring the obstacles, and the RVO obstacle isn’t helping (see my post with video). If you PM me I can share my AIPath2D and the math to add to AstarMath.

In the current beta version the 2D RVO system does not consider unwalkable nodes in the grid graph as obstacles nor regular RVO obstacles, it will only take other agents into account. In my dev version it does not take the grid into account even in the RVO system (albeit with pretty bad performance for large graphs at the moment). The AIPath script doesn’t support 2D either without some changes.
If you want I can share a preview version of the new RVO changes.

Maybe you should adjust the Seeker->StartEndModifier -> EndPoint value. Make sure it is set to ClosestOnNode.