AI going up curved stairs

Currently trying to get AI to go up a curved Stair. I can set up a nav link in blueprint between the bottom of the stairs and the top of the stairs, but I think the curve is too difficult for the AI to navigate. The stairs are fine. There is plenty of space for a character to go up and down, the player uses the same model and has no issue. I tried adding a series of navlinks from the bottom of the staircase to the top, hoping it’d form a chain they could follow, but it didn’t because the stairs aren’t large enough to generate their own navmesh spot. This structure is a blueprint structure that is placed dynamically, so I have arrows on each stair and at the top and bottom and use blueprint to assign them to the arrays. As you can see from the first picture, this works fine, there is a green arrow between the two points, the AI just doesn’t understand the stairs. How can I get them to go up and down here?

Try increasing the navigation meshes agent step height and slope values inside of your project settings.

Project settings → Navigation Mesh → Generation. You will have to play around with the settings to get your desired outcome, but the ones most useful for this would be “Agent Max Slope, and Agent Max Step Height”. You should see the green navmesh update and go up the stairs, indicating your AI will also be able to if your mesh is setup right.

Hope this helps!

Okay, thanks for the info… I forgot to also mention the project navigation mesh setting “Cell Height” may also help. If not, I’m thinking it looks like you might need to use a combination of solutions with the nav invoker component if it will work for your project? So besides setting the step and slop height as reasonably high possible and using nav links, you mentioned changing the size of the navmesh tiles. You could change the tiles size and instead of generating navigation for your whole world or map, you can switch to using AI nav invokers and only generate navigation around the AI as it moves. This way your not generating huge detailed navigation that’s freezing the engine. I cannot think of anything else other then that, maybe somebody else will have another solution, but let me know if you want to try that and I can give you some instructions on nav invokers.

Oh and just because the green nav mesh does not show going up the stairs does not mean the AI cannot, sometimes the green nav mesh does not display correctly, but the AI will still be able to go up, so you should test and not just rely on the green debug nav display. I believe “Cell Height” helps with this as well.

Thanks for the reply. Unfortunately increasing it to a level high enough to get them to be able to go up requires me to set the step height to like 600 in order to cover all the stairs.

Even with 89 max slope, it isn’t enough to get it to work with anything left, and at 600 step height it just becomes a mess. I know that if I resize the collision mesh that is on each stair to about 5x in both the X and Y direction it starts to generate small navmesh spots on the stairs, but that isn’t practical. Also if I change the size of the navmesh tiles, it’ll start to go up the stairs, the problem is the loading time goes from instant to like freezing the engine before I can drop it low enough to actually cover all the stairs.