Agent Avoidance Next Step

I have a custom script that computes a path to an intended destination using a Recast graph. I’m using ABPath.Construct.

_AIPath = ABPath.Construct(PlayerHandle.Transform.position, position);
AstarPath.StartPath(_AIPath);

It works well. I am now at a point where I would like to add agent to agent local avoidance. It looks like I have some different options, and it is unclear to me which path is most appropriate.

  1. Do I use use an RVOSimulator? From the code sample, I am not seeing how it integrates with my recast graph and calls to ABPath.Construct. Custom Local Avoidance Movement Script - A* Pathfinding Project and Local Avoidance - A* Pathfinding Project

  2. Or do I periodically recompute the path? AstarAI.cs - A* Pathfinding Project.

  3. I can add DynamicObstacle to my agents, and then recalculate? DynamicObstacle - A* Pathfinding Project

I probably should have used one of the existing scripts out-of-the-box. But I am not using the built-in Unity controller. I suspect I need to integrate RVOSimulator with my existing pathfinding script – but the documentation is challenging for me to follow.

Any guidance or suggestions are greatly appreciated. Thank you for making a terrific product!

A quick note about local avoidance from aron himself:

Basically, you put an RVOSimulator in your scene and an RVOController on the units you want to have local avoidance. To the best of my knowledge it doesn’t really integrate with your Recast graph

You actually don’t need to use the Unity built-in Character Controller to use the movement scripts provided already.

If you want to go this route, we can help you get this going for sure :slight_smile: but you may want to fiddle around with the existing movement scripts to see if they help much first.