Nav mesh agents getting stuck after upgrading to Unity 6

This is a quick PSA in case anyone else bumps into this problem. I had a project in… I think Unity 2022. I recently upgraded to 6 and my nav mesh agents were getting stuck all over the place. after doing a lot of debug logging, it looks like the calculated paths were returning as “partial” even though the final corner was right on target.

The solution was grabbing everything in my scene, copying it, creating a new scene, and pasting it in, and then re-baking nav mesh. I’m not kidding. it appears that there may be some legacy invisible junk in the scene data that was screwing things up.

did you remove the old navmesh data, and try just rebaking?

1 Like

yes indeed! First thing I tried, I believe.

Try setting the Stopping Distance to 0.1 or something greater than 0. I was also seeing this problem since upgrading to Unity 6 and it seems when the random spot on the NavMeshSurface returned a spot right along on the edge of the NavMeshSurface; the NavMeshAgent could not complete the position when the stopping distance was 0. So far it has now completed at least 4 times when the walk point was on the edge of the local walk mesh for the AI NavMeshAgent.