[Solved] Sprite Facing Control


I am realizing a topdowm shooter like SmashTV.

I have a problem.

  1. My character must flip horizontally when changing direction, but at the same time when moving up or down he has not to flip vertically.

  2. I have serious problems when use the change animation feature after a key pressed or released.
    For example, if my sprite is facing left, if it goes up it flips horizontally, and I have serious issues trying to let Gdevelop “remember” the preceding facing.

There is a mode to change and/or control the facing of the sprite, or I am forced to create a flipped animation, with these problems I illlustrated?

There is a free extension with a movement scheme like (1) that I can study and replicate?

Thanks and sorry for the poor explanation, but I just started a few days ago to develop with GDevelop.

Hi there it sounds like you’re tying your flip action to the character movement and not to a key press??? Actually I’m not sure, it would be so helpful to see your events.

Hi, I have solved in the way illustrated by the screenshot, under the “Player Movement” Comment.


Oooh ok I see, you’re actually using the same animation for up down left right. So that might make it simpler to fix, because when you push Up you’re saying, set animation to walk, and the default walk animation is not flipped. That’s what the problem is, every new key pressed you’re resetting animation to the default walk animation.

Instead of all those

Make a condition player is not moving, set player animation to idle.

Make another condition, player is moving, set player animation to walk.

Make another condition, left key pressed, flip player yes.

Make one more condition, right key pressed, flip player no.

Good to go?

1 Like

Great! I will try your advice as soon as possible. Thanks Again!

1 Like

I tried: It works perfectly! Thanks

1 Like