constrainInsideGraph teleports agents to center of graph

Hey there,

I’m having a problem where if I enable constrainInsideGraph on an agents AIPath, they will teleport to the exact center of the graph.

I am using a layered grid graph on a 3D environment with floors and such.

Unity version: 2021.1.16f1


Do you have any additional screenshots?


I don’t know what I should take screenshots of but I’m uploading the navmesh, the pathfinding settings and my agent scripts.

Any help would be very appreciated.


That does indeed seem to be a bug when the agent is too far away from the navmesh.

To resolve it, you can increase the A* Inspector → Settings → Max Nearest Node Distance field, so that the agent can always find a valid point on the navmesh.

Thank you, that did the trick!