Regarding NavMeshAgent behaving abnormally

NavMeshAgent

NavMeshAgent moves fine when a long distance is specified, but when a short distance is specified at a particular location, the Agent’s movement becomes strange. Sometimes the Agent moves normally and sometimes it moves abnormally even in the same location; when the NavMesh is zoomed in, there is a blue line that intersects the NavMesh in the location where the abnormal movement occurs, and the Agent seems to move along this blue line when it moves abnormally. Why does the NavMeshAgent move abnormally even though the terrain is similar? The blue area is Walkable and has a cost of 2. The red area is User3 and has a cost of 1. Thank you in advance for your help.

I’m not used to NavMesh but it looks like your agent rotates a lot when it fails to reach the target as intended. Maybe try to give him a lot of rotation speed to test if it’s linked to it.

Fixed NavMesh

Thanks for the reply.

I have increased the AngularSpeed faster but the result did not change.

The NavMesh shape of the position where the abnormal movement occurred was different from the normal position, so I corrected it and ran the simulation, and the abnormal movement still occurred.

I am not sure why this happens, but the location where the anomaly occurs is the origin, so I moved the map from the origin and built the NavMesh, and it works fine. Furthermore, when I looked at the NavMesh shape at that time, the blue crosshairs disappeared.

This method did not solve the problem, so I increased the width of the gate and it worked correctly. The unusual behavior at the origin (0, 0, 0) may be a bug.

The only reason that comes to my mind is a reversed edge, when the position of 2 vertices is swaped. This gives you this cross and navigation may not work as usual. If the problem recurs, try to slightly move the position of one of the 4 vertices and rebuild the Nav Mesh.
And indeed, having 4 vertices around the origin, each vertice having positive or negative values ​​on different axis can add a lot of problems if Unity Nav Mesh is not robust enough.

Thanks for the explanation.