I'm creating a top-down 2D space game in LIBGDX for android.
When spaceship is going forward it will look like this:
when it goes upward I want to change it's direction with a nice animation so it seems like a real spaceship. A between frame would be like this:
I have rendered the spaceship in different Z axis degrees from ship0 to ship90. Calculating rotation on XY plane wouldn't be so hard, but I don't know how to calculate the rotation on Z axis so I can choose the right sprite to use.