how to lean an object smothly towards its moving direction by its velocity?

Hi everyone :slight_smile:
I’m working on a 2d side scrolling game in which i have a ufo, i want the ufo to lean smothly towards its move direction (only right and left) relative to the ufo’s velocity in other words i want to change its rotation slowly towards the move direction as well as rotate back to 0 degrees(around the z axis) when the ufo is not moving.
(i think that you can do it with lerp for the rotation, but i’m not sure).

i tried but couldn’t do it so if someone knows how i would love to hear ,thanks! :slight_smile:
btw, im a beginer so forgive me for the weird questions sometimes xD

ok thank you i will try agian <3 but if someone else succeeds i would love to hear!