Make the enemy AI smarter.

This is my first time asking a question, so I’m not used to this and there might be many unfamiliar things, but thank you in advance.

MyVideo1

I’ve created an enemy that chases the player using a node called ‘Simple Move to Actor’, but it doesn’t recognize slopes or narrow stairs as climbable areas.It seems to only recognize wider stairs as climbable, as shown in the video. I would like the enemy to be able to climb slopes and narrow stairs as well. How can I solve this problem?

Thank you.

Hi @RyotaUeda728! Welcome to the forums!

First, you will want to open the project settings.
image

Next, you can do a search for “Agent” and it will bring you Navigation mesh settings.

The settings you are looking for are “Agent Radius” and “Maximum Slope!” :slight_smile:

2 Likes

I am not pro of AI things but as I know this thing is about NavMesh.

In your 3D window select Show >> Navigation and you will see the nav mesh in green. That tiny stair and the big character seems a bit suspect to default nav mesh settings.

Sometimes after adjustments you might have to rebuild the nav mesh which is Build >> Navigation >> Build Paths (happens automatically in full level build, but this saves time).

Devs and/or level designers will have to be aware of settings for max step height, max stair or ramp angle, and min stair or ramp width.

MyVideo3

I’m surprised at how quickly I received a response. I appreciate your advice.

I tried various things, but I couldn’t include narrow paths within the range of the navigation. Also, I managed to include slopes in the navigation range, but it seems like enemies can’t climb up the slope. Could there be a cause other than NavMesh?

I can see you made some headway, but at this point we need to know what you’ve changed vs what you haven’t tried out of our suggestions to be able to help further. :slight_smile:

Get back to us with your process and let’s see what’s remaining!