How to correctly use pathfinder for 2d platform enemies?

Enemy starts following player correctly on horizontal, but if player jumps the enemy tries to follow. What am I missing ?

image

Pathfinding finds the shortest route between object and target and ideally works for top down games, where gravity isn’t a consideration.

When your player is up in the air, the shortest route from the enemy is a line into the air; it’s not along the platform.

Here’s an old thread in which the OP briefly explains a way to get around by using invisible pathfinding obstacles that prevents the enemy from rising into the air.

You are right! Pathfinder extension does not feels natural for platformer.

I will try some workaround like “simulate key press” based on X,Y positions between enemy and player.