I am building a sprite that I want to spin along an axis. I am using SpriteKit on iOS for this, but I'm sure that the question is not really tool specific.
In my case, I have a sprite such as:
and I want to rotate it around the red line as if it is a spinning disc spinning in 3D (even though it is only a 2D sprite).
SpriteKit gives me the SKTransformNode class that allows me to adjust the X, Y and Z rotation of the node. So I am able to rotate the sprite along the X or Y axis in pseudo 3D. The following 3 images attempt to give you an idea of what I'm trying to achieve:
I thought I should be able to animate the rotation around the X and Y axis in a way to achieve this but I've found it harder than expected.
I'm hoping that someone can point me in the right direction.
to further illustrate what I don't want, here is what happens using simply Y scaling without using an SKTransformNode. Note that the image inside the circle does not reflect as it turns.