Animation when Left/Right of enemy

Hi! I wanted to make a naruto style fighting game and I need help!
If I am left of the enemy I want to look right
And If I am right of him I want to look left(so I have my eyes on target)
I have both animations for left and right but I could not figure it out. I tried using the angle from the sprite utils extension! Help pls!
Thx

2 Likes

My first post was just to point out that you can have an animation for not moving and facing a particular direction. This post demonstrates that the player faces the enemy after it finishes moving:

You had the character animations in the game update method. The game update runs continuously, but you only need to register the character animations once. I also changed ‘Animation Naruto Still’ to ‘Animation Naruto Still R’ and used this when ‘not moving’ and ‘facing right’; and vice versa.

Already fixed! I used 2 sprites left and right of the enemy to detect!

There’s an extension that helps with this.

This extension helps with animations. It let’s you set specific animations based on which direction you want your sprite to go.

I am using this! I meant with that If you where ever I am I look at the enemy!
The animation is already good! Thanks tho!