Doesn't like slopes

Just started today, the mesh looks great but the AI just…goes clear through the slopes in an endless circle.

I must be missing something–please help!

Figured it out. Selected ‘project settings’ under gravity and ramps work perfectly now. I had selected “none” because it’s not a physics-driven game. Is gravity essentially a requirement for 3D pathfinding in A*?

Sooooo now half my guys are falling through the mesh with gravity on (yes they are spawned above the mesh), even with “constrain inside graph” checked on. I don’t understand how agents can calculate a valid path ON the grid/mesh and then proceed to fall right through it / ignore it. No other scripts are setting position, and there’s no rigidbody. I feel like I MUST be missing something here.

Is there no other way to make ramps work besides turning gravity on? I reallllly don’t want gravity/physics calculations in my project just to make pathfinding work. Could use some support on this.




With the ai’s gravity settings enabled, the AI will do a single raycast per frame to position itself accurately on the ground. It is not recommended to only rely on the y coordinates of the navmesh since those are usually not accurate enough for visuals. A single raycast per agent is very cheap in any case.

Make sure your ground has a collider and that its layer is included in the AI’s raycast ground mask.

1 Like

thanks for the reply! It’s doing a lot better :smiley: