Chasing up stairs lets enemy fly

In our level design we a little platform the player can walk up stairs to get to. When an enemy detects a player at the higher elevation the enemy doesn’t pathfind to the stairs instead the enemy starts walking on air up to the platform.

is there a way to make the navigationagent keep the characters on the ground? additionally can we use that mechanic to cause characters to fall from the platform rather than walk on air?

I personally haven’t gotten to this point in the course yet, however with a Characterbody (be it 2d or 3d) there is no forces acting on the charcater. so in the case of a player (or of an enemy) they don’t fall because nothing is telling it too, you would have to add the gravity (either from project settings or just pick a number that feels good to you) and have that gravity added to the charcter if IsNotOnFloor() (I think that’s the function you need to call)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms