Strange NavMeshSurface Behavior

Hopefully someone can help me to understand the issue here, using NavMeshSurface.

The Agents are set to follow the player and do so as expected with the exception of this edge case where they exhibit rather strange behaviour.

When the player walks onto the bridge, the agents take the shortest path to the spot directly underneath the bridge.

When the player stands under the bridge, the agents take the shortest path to the spot directly above the player, on the bridge.


Any ideas/suggestions as to what is causing this issue and even how to resolve it?
Thanks in advance for any help.

bump

If someone knows a better place to ask, maybe as its the NavMesh Surface component this would be better over in some git thread? Not really sure where to ask.

The behavior seems consistent with Agents getting the vertical position confused. I guess it would make sense to build better navmesh sections and use links.

Any pointers or suggestions would be appreciated, thanks.

I’m also getting this and would LOVE to know some sort of fix/even if it’s considered a bug… xD

One thing I’ve noticed for me, is that if I set their destination via game object I don’t get this, but if it’s via vector I do.

1 Like

Interesting, I will take a look at this. I am also going to test it against a Navmesh built with the standard Unity baking to compare to the surface component. I will post results here.

Either way this upside down mess surely can not be as intended?

…and thanks for replying.

Just a quick confirmation: This happens with the built in NavMesh as well as with the NavMesh Surface component.

@thatscraigz_1 : I’ve noticed that if I remove the nav obstacle on the player, this behaviour doesn’t happen anymore, so for me at least this is most likely the cause of the issue. I guess the AI tries to find the route, can’t get inside the Nav Obstacle, but can (in a fashion) get inside it at a different height.