Finding which Direction

I have created a enemy sprite that uses Pathfinding Movement that moves to the Player. But I’m stuck on getting the enemy to face towards the player. I’m trying to create a side scroller beat them up where there is a little movement up and down. A example would be Final Fight.

why aren’t you compare X positions fo playar and enemies?

I would probably have a separate hitbox object (which has your pathfinding behavior on it) and a separate sprite object (which has your actual art on it).

Then you can just compare your hitbox object’s angle, and if it’s > 90 but < 270, it’d be facing left. Otherwise it’s facing right. More able angle here: Basic game making concepts: What you need to know to start with GDevelop [GDevelop wiki]