I have created two SKSpriteNode with . I am rotating one around the other. So I give both physics bodies and create a joint like so:
[self.physicsWorld addJoint:[SKPhysicsJointPin jointWithBodyA:earthNode.physicsBody bodyB:moon.physicsBody anchor:earthNode.position]];
Then for every touch I perform the rotation:
- (void)touchDownAtPoint:(CGPoint)pos { moon.zRotation = moon.zRotation + 3.14159/2.0; }
The issue I am having is that I expect the image to rotate to 90 degrees here, pi halves radians, but it seems to rotate somewhere between 1/4 and 1/6 of the way around the circle. However, when I change the rotation to:
- (void)touchDownAtPoint:(CGPoint)pos { moon.zRotation = moon.zRotation + 3.14159*2.0; }
There is no movement at all. This is just as I expect as 2pi radians should bring me back to the same location. So how does .zRotation actually work?