I have an object (SKNode) that contains two other objects (SKSpriteNode).
What is the right way to mirror combined objects?
What I have:
What I want:
SKAction* action = [SKAction scaleBy:-1.0 duration:10.0];
[node runAction:action];
Pretty much the same as LearnCocos2D but I know you asked for an SKAction.
Flipping is the same as inversing scale:
theNode.xScale = -1.0;
theNode.yScale = -1.0;
Apply it to the parent node and it should flip the child nodes around the center of their parent node.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.