[FIXED] How do fix player animation

hi im making a platformer game and the events and jump animation are not agreeing with me (im very new to gdevelop) ive tried everything i could think of and also refering to the forums

the problem with this is when im pressing the space key and the player is facing a certain way the code is working when the player is facing right but when its facing left the jump animation goes to the right

Since this is platformer then there is no sense in checking angle of object
I get that you are now so take it as a tip
You check angle of object IF it would be topdown game and your player would change angle by rotating

As for platformer you would simply flip animation of object horizontally based on if you pressed Left/Right A/D
For example if your animation (image) is your player facing right
Then when Left/A key is pressed then you flip animation of player horizontally and set it to YES
When Right/D key is pressed you flip animation horizontally and set it to NO

Also do not use if all these conditions are true IF you are not putting it under IF one of these conditions is true

On top of that all conditions needs to return true that are inside condition list of a event

@IAMDAKSH, angle refers to the rotation of an object on the screen (think Asteroids space ship).

When you change the animation to one facing the other way, you are not changing the rotation; only the animation is changed. GDevelop does not recognise that the sprite is facing the other way - as far as it’s concerned it’s just placing a different image on the screen.

If the images are the same for both left and right facing animations but one is the flipped version of the other, then I’d suggest you add the PlatformerCharacterAnimator behaviour to your dino sprite and enable horizontal flipping. It will face the sprite correctly when dino is moving left or right.

thanks but i do have some other problems I need help with

If they’re mirror images of the unflipped animation, then ditch them?

i fixed everything thanks to everyone :slight_smile: