Is there a way to create a SKSpriteNode and pass it an image name, but have it reflect the image horizontally?
Asked
Active
Viewed 2,813 times
1 Answers
4
You mean you want to flip the image?
node.xScale = node.xScale * -1;
or
node.yScale = node.yScale * -1;

Kazuki Sakamoto
- 13,929
- 2
- 34
- 96
-
1xScale flips the node and all of its children. This works for simple sprites, but if the sprite has children, I need to reflect the image only, not everything. – Alex Stone Jan 17 '14 at 18:12
-
1Separate the image from the node. Thus create a SKNode and append a SKSpriteNode with the image. Append the children to the SKNode. – Kazuki Sakamoto Jan 17 '14 at 18:57