Advanced 2D&3D AI Jumping

Godot Version

4.2 - 4.3

So i was never able to find a proper tutorial on 2D advanced AI jumping, even tried searching for just the logic, no matter the engine. It all was either too simple, where an enemy jumps in front of a wall, or a gap, or if the player is above them. Or too complex. So i’ve come up with a pretty simple and powerful way to achieve that and even more using NavigationLink2D.

I was able to make my enemies jump, fall down one-way platforms and even climb ladders. All that was only happening if a navigation path decided that it needed to do that in order to reach the target, no hard coded stuff.

Further details are in the video:

This logic can easily apply to 3D environments too.

2 Likes