AI refuse to navigate steps despite having a valid nav mesh

I cannot understand why the AI refuse to properly navigate my steps. The angle is only like 25 degrees so it’s very much within step angle limits. The nav mesh also is drawing it as valid. Below is the nav mesh.

Below is what the AI keep doing.

They just get stuck and refuse to step up or down. The stairs and the planes above the stairs are also set to allow character step up. Below are my relevant nav mesh settings.

Nav Mesh
Cell Size: 19.0
Cell Height: 19.0
Agent Max Slope: 44
Agent Max Step Height: 45

AI Character Movement
Max Step Height: 44
Walkable Floor Angle: 44.76
Can Walk Off Ledges: Yes

This is driving me nuts. I’ve been tweaking these settings for hours. Why in the name of all things holy is stairs so god awful complicated for AI. They’re not even stairs! The collision box is a ramp!

Hey there @Krileon! Awesome looking project you’ve got going! Is there any way you can pop 2 of these navigation test actors in your scene? One at the top of the steps and one below to see if pathing is at least showing correctly. (which it should since the navmesh is all green but I’ve seen some outliers).

Don’t forget to set the other actor here:

this should verify that the pathing is working correctly.

Let me know how it goes!

Not sure what I’m supposed to be looking for.

They don’t show up or anything when I press Play, but that’s how they show in the editor. I even reduced the stair height by 50% and my AI still won’t walk off the stairs onto the flat platform at the top nor will the walk down the top onto the stairs.

If I set Cell Height to something crazy like 59 it works, but then my AI are floating in the air which I obviously don’t want. Note my AI are using NavMesh Walking for their movement.

Also made some clean new simple AI with just their behavior tree to chase the player and their navmesh walking enabled. Same issue. They get stuck.

I think the collision boxes of the stairs might be why. They look fine when editing the mesh, but ingame they look like the below.

Will try deleting the collisions on the mesh and redoing them.

Edit: Generated new convex collisions that fit the steps perfectly. Still doesn’t solve the issue. I think I’m about to just be done with stairs forever. I’m blown away how difficult it is to get the AI to understand a simple 20 degree slope.

So that orange line tells us the pathing is working and that the actor should be able to recognize it’s walkable terrain. So it’s got to be something on the AI controller or movement itself then. It’s even odder that you had changed the mesh to convex collisions and effectively made it a light slope and it didn’t work. How are you passing the locations in?

If I move the stairs away from the wall they seam to work better. Something really odd going on with the navmesh. As for the AI as you can see in my above screenshot I used a brand new AI that has nothing on it except the behavior tree which is just a “go to player forever” behavior. They are using the crowd controller though, but I don’t see why that’d stop them from going up slopes.

It doesn’t seam to like my stairs being modular pieces or something.

That is 6 different parts directly touching. Example below showing a part.

Do I need to merge all these into 1 mesh? How would I best do that? This is a modular art pack I bought.

Edit: merged them and doesn’t help.

Seams to be caused by my collision channel. Changing from my custom collision channel to Default fixes it.

Doesn’t make any sense. Specifically it’s the Object Type that’s the problem. Changing it to WorldStatic is what fixes it, but I need my own collision channels and object types. I guess nav mesh movement doesn’t take this into account?

Edit: Nevermind that was only somewhat working due to me falling through the stairs. I think I’m just going to give up on stairs. The AI just absolutely hate them it seams.

I tested with a custom collision and my AI was able to walk on it just fine, especially when you can see the nav mesh is generated around it so I doubt that’s the issue. If you set it back does the issue com back ? I’m thinking you just needed to force it to regenerate the nav mesh ?

It doesn’t matter what I do. There’s always goofy random holes in the navmesh.

Then the AI always just stop at the top of the stairs.

I’ve adjusted navmesh settings like crazy. The only way for them to work is if I set ceiling height to something ridiculous like 60 and then I get floating AI.

Ok, it is absolutely something to do with object type in collisions. Leaving everything alone and setting the AI object type to Pawn instead of my custom Monster and they work fine. Does navmesh not work right with custom object types? What am I supposed to do about this. I need custom object types. I guess have to try and replace my collision checks and such with tags? This is so absurdly frustrating.

Got it working! My Floor collision channel blocks Player and Monster. Next my Player and Monster also have block for Floor. I had to change Monster so Floor was ignored. I guess this is because the navmesh deals with the collision? The AI don’t fall through the floor and will navigate the stairs fine.