0

For example if you have a rotated sprite, to which you add another rotated sprite, and so on. How would you determine the on-screen zRotation of a sub-sprite, or the "absolute" rotation of a sprite?

openfrog
  • 40,201
  • 65
  • 225
  • 373

1 Answers1

1

If I'm not grossly mistaken, it's simply the sum of all zRotation properties of the node and its parents (excluding the scene).

For example:

CGFloat absoluteRotation = self.zRotation + self.parent.zRotation;
CodeSmile
  • 64,284
  • 20
  • 132
  • 217