How to rotate sprite towards direction of movement?

Hi everyone,

I have a sprite of a space ship with a PhysicsArcade Body. I’d like the sprite to always rotate towards the direction of its movement.

Somehow I am stuck and have no idea how to set this up.

Many thanks

sprite.rotation = sprite.body.angle;

Many thanks!

It took me a while to understand that my sprite was facing the wrong direction in the first place. Now it works as expected.