Is there some way to get a SKNode's zRotation relative to its scene rather than to its parent? Or even relative to any other SKNode?
Right now I'm doing this:
func rotationRelativeToSceneForNode(node: SKNode) -> CGFloat {
var nodeRotation = CGFloat(0)
var tempNode: SKNode = node
while !(tempNode is SKScene) {
nodeRotation += tempNode.zRotation
tempNode = tempNode.parent!
}
return nodeRotation
}
But I'm not sure this is the best way to do it.