Lightweight RVO, ECS and RVO obstacles no pathfinding graph

  • A* version: [5.3.3]
  • Unity version: [2023]

I’m using the lightweight RVO coupled with RVO Simulator scripts to give my entities RVO capabilities. Those are the only 2 scripts I use in my project from this package. I don’t want to use any other pathfinding solution from the package because I got my own custom one.

RVO works fine with against other moving agents. But what about obstacles? Is there no support for RVO Obstacles? I see the old one has been deprecated in favor of navmesh. I’m not using a navmesh though. Is there no way for me to expose some of my own non agent entities to the RVO system, given their position and size only? This is a 2D grid based game, so my entities are always 1x1, 3x4 etc. I’d like my agents to be able to locally avoid those obstacles.

I did try coupling my pathfinding with the astar RVO system and it works, but it doesn’t look very realistic as mine simply follows a grid based path and leads to issues where multiple agents try to reach the same waypoint at the same time.

Hi

Currently, there’s no way to pass custom obstacles into the rvo system. It’s hardcoded to use the A* obstacles I’m afraid.

What you can do is to inform the system about collisions with walls. You can do this by setting the agentData.collisionNormal value.

See also SetCollisionNormal - A* Pathfinding Project

Setting this will make the agents behave much better when colliding with walls, though they will not be able to avoid walls before they hit them.