I programmed this ai to follow the player in the last section of the game but as soon as the player goes on the stairs and turns left (its L-shaped Stair) the ai turns around and goes back why is this happening and how do I fix it.
How does the AI follow – does it use navigation mesh, or some other method?
If you “display navigation mesh,” is there sufficient area to walk up the stairs and turn?
Is there enough ceiling height above the stairs?
These things tend to work best when stairs are very wide, the ceiling height is very tall, and the collision geometry is a ramp rather than individual stairsteps.
Turn on navmesh visualization to see whether there’s enough to move on.
Also, the agent may decide that it has an easier time getting to the right X/Y position on the lower level (I’ve seen this happen before) so make sure there’s sufficient Z clearance between the levels, if they overlap in height.
Making everything bigger/wider/taller/more separated than “normal” tends to work best.
i tunred on nav view and it looks like its not covering some part of the stairs. how do i fix it?
also the problem with ai not following is when the player is running and it goes out of sight i think thats when it the ai turns back. cuz when i walk slowly its able to follow me to some point.
how do i fix twisted nav mesh? is it even problematic?