Smooth animation

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Darkmoon1315

Hi, Friends of Godot, It is my first question in the forum :3
I am working on a 2d platformer and I don’t know how I can create a smooth animation when the character changes its direction
E.g The character is walking to the right and changes the direction to the left

Something like that
https://piskel-imgstore-b.appspot.com/img/9bae126e-12bb-11ed-8cae-c7973df0c641.gif

My question is how can I improve this in my game
thanks

:bust_in_silhouette: Reply From: oublieduchaos

Ok, are you speaking about sprite animation or code?
For sprite you only need to try animation, do with one leg it work better, does your character has hair, and if it continue to flew? well play with momentum

As up for code it will be momentum too, but with code it work with acceleration, so try to put some max value and let your body accelerate!

OublieduChaos