How to improve repaths around squared nav mesh cuts?

Path is being built very close to corners of navmesh cuts, units slowdown there and some of them eventually just get stuck, walking on the very edge with 0 speed.

My agents have simple smooth and funnel enabled on them.
I dont use radius modifier, because I set shared radius in the graph settings


Also, sometimes infinite repath loop happens in other places as well:


It sounds like you want to expand the navmesh cut a bit to account for the agent radii.
In the beta version, there’s an option on the navmesh cut to automatically expand it by the recast graph’s character radius.

@aron_granberg i dont think its related to character radius, because i can manually make nav mesh cut bigger than the mesh.

Agents just dont like sharp corners of the cut. If you make it bigger but the geometry is the same they will still get stuck.

Maybe you can add some option to funnel so it doesnt build paths so close to the edges? Just a suggestion, i dont know the optimal solution, but the issue is with the square shaped cuts, no matter the size.

On a second thought, I think a combination of rectange and circle options (ellipse) would also solve the problem, if its hard to improve the algorithm

Circle lacks the ability to make a long side
While rectange lacks the ability to make rounded edges


If you are using the AIPath script, it looks like your pick next waypoint distance setting on that component might be a bit too high. This will cause it to try to cut corners a lot more, and could make it get stuck like that. Try reducing it a bit.

1 Like

I think that solved it, yes. It seems it’s good when its set to be as low as character radius, which is 0.4 for me.

1 Like