I have a SKSpriteNode that runs a SKAction that rotates it forever. So basically, I have the following code:
[myNode runAction:[SKAction repeatForever:[SKAction rotateBy:M_PI*2 duration:1]]];
At some point, I'd like to access the current angle at which the node is at. Something along the lines of:
float currentAngle = myNode.currentAngle;
Does anyone have an idea of how I could go about doing this? I have tried searching the docs but haven't found any "angle" or "currentAngle" property for a SKSpriteNode.
Try This... It will give you rotation angle.
NSLog(@"%f",myNode.zRotation);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With