AI stops moving on lower floor despite reachable multi-floor NavMesh

Hi everyone,

I’m having a problem with AI in a multi-floor building in Unreal Engine 5. The situation is as follows:

  • My level is a building with multiple floors.

  • The AI is set up to chase the player using MoveToActor in Blueprints.

  • The NavMesh covers all floors and is fully connected — I’ve verified this using the P key and the AI can move between floors if the player is on the same floor.

The issue:

  • When I (the player) am on a higher floor than the AI, the AI moves underneath me to the closest X/Y position on the NavMesh but does not climb to my floor.

  • It seems the AI is only considering horizontal distance (X/Y) and stops moving once it reaches the X/Y coordinates, even though the Z difference is several floors.

  • Despite the fact that the path is reachable and the NavMesh is connected, the AI triggers its attack while still on the lower floor.

Things I’ve verified:

  • NavMesh is connected across floors.

  • MoveToActor completes because it “thinks” the closest NavMesh point is reached.

What I’m looking for:

  • How to make the AI properly chase the player across floors, taking vertical distance (Z) into account.

Thanks in advance!

Hey @Brainflame !

Can you show your code? Some things we’d be looking for are Z locations being left out for any reason, how you’re setting up the AIMoveTo, Acceptance Radius, etc. Bring us a little more code pics than you think is necessary! :slight_smile:

1 Like

First up thank you, also here is the script, if you want I can send you the script that defines “Closest Player“ but I’m pretty sure that works, as the problem isn’t that he isn’t following the player, just that he goes to the player ignoring the z coord

i think you would have to add before Ai moveto another branch then [get the location of current actor (A.I You want to move)] then [get your closest player location (or Non-Ai Character)](Split the location pins to only capture Z axis) and check if the Z heights of both the (A.I You want to move) and or (Non-Ai Character) are equal. its been awhile since i played around with ai but you may also need to add a [move to] location for bottom and top of stairs when that Z position is not equal

I just found the issue, after working 3 hours on a Checkpoint system I saw that in between the floors there are those lines and at first i thought, well theres nothing in the way, the ground is one solid object its just something visual, but after placing a “navLinkProxy” to connect them it worked.

1 Like