NavMeshCuts not working with Agent Radius

We’re making a game with a specific set of constraint which led us to ditch Unity Pathfinding early on. Our game is based around :

  • Multiple Agent Sizes
  • Agent specific obstacles
  • Dense destructible environment

For our Pathfinding needs we settled on a recast graph per Agent, with all obstacles handled as NavMeshCuts configured to only cut specific graphs.

The problem we’re struggling with currently is that NavMeshCut doesn’t take agent radius into account (and probably shouldn’t) but neither do the RichAI nor the RVOController while pathing around or between cuts. We also tried using the RadiusModifier but it doesn’t seem to help.

Thankfully our agents physics prevents him from clipping though objects, but it still leaves lots of cases where the agent will try to path through a gap between cuts that is significantly smaller than itself (and it’s collider) leading to the AI getting stuck.

We’re currently considering creating as many NavMeshCuts on our obstacles as there are agent sizes each with an incrementally bigger “cut” to account for the agent’s radius. It probably has performance implications though, as well as complicates the workflow.

So we’re wondering if there is a way for an agent to not only go around NavMeshCuts while being mindful of his own radius, but also to seek paths large enough for it to fit between cuts.

Hi

Luckily, there’s a simple solution for this. You can upgrade to the beta! Navmesh cuts have an option to take the agent radius into account there.

See A* Pathfinding Project