Agent not following the navmesh surface correctly

Hi, I’m having a problem with my agent movement and I’m not able to understand why this is happening and what to do fo tix it.

I have a raycast mesh and I’m using the FollowEntity on my agent.
as you will see in the video below, the mesh is a perfect fit on the stairs and the agent goes up the stairs with no problem to its destination. However, when it needs to go down the stairs, instead of following the mesh, the agent is just walking forward in mid-air.

Why would this happen? how can I fix this?
I don’t have any links anywhere here and it’s just the normal mesh that was auto-generated (similar to the Raycast 3D example scene I’m assuming).

Many thanks in advance

Hi

What is the gravity set to in your project settings?

Haven’t changed anything in here (maybe I should?)
When I load the scene I have the agent in the air and he falls

(not, not the most expert in physics… tips welcome)

That’s strange.
Are you sure there are no invisible colliders in that region?
Try moving the agent a bit upwards when it is floating, just to see if it falls down again on some kind of invisible solid surface.

ok not what you mentioned … I there is indeed a collider in there that covers the whole room. However, it’s not even on the same layer as the ones I’m masking for the mesh. Shouldn’t it be ignored?
how can I make sure I ignore it?

The movement script has a raycast mask that it uses for gravity. Or, if you are using a rigidbody, you should make sure the agent’s layer and the collider’s layer has disabled collision in the physics collision matrix in the project settings.

found the Agent rasycast mask and it worked :blush:

God… so many ins and outs xD I will get there…
thanks for the help!

1 Like