when i walk to left my animation is left but when i walk up i want the animation is the same before walk up. also on right animation how do i do. Very new to godot and programming
At some point before you start the animation player, you should flip, or change, the sprite to face the direction they are moving. So after the animation ends the player is facing that direction in their idle state.
Hi. You can do independent methods for movement and animation. One for the movement of the sprite himself, and other that chooses the right animation. You can make a variable for remembering the last direction is facing. For example if the last movement is “left” and the new movement is “up”, don’t change the animation.
Of course, there are a lot of ways to do everything in code.
Really thank you . If I only have 2 side of animation and my game is 2d pixel art top down rpg. Should I use animation player only or also use animation tree too. Which u prefer
I think AnimationTree is for blending 3D animations. In your case, being a 2D game, maybe using an AnimatedSprite2D can be the best solution if you don’t expect to create complez animations.