• Editor
  • Stop animation - cocos2d iphone

  • Изменено
Related Discussions
...

I am animating my character and I don't see a method for stopping an animation so he goes back to the normal pose. Sorry if this is such a simple question.

Also, I am creating a jump pose and a falling pose. Jumps and falling are going to be static-ish. I am trying to wrap my head around the best way to achieve this without over complicating it.

Thanks!

Another silly question but how do I flip an animation on the X axis?

CCSprite supports flip but nodes do not. So to fix this I just did this.

node.scaleX = -node.scaleX

That works for flipping the whole thing.

See node->skeleton->flipX.

To stop an animation you can set the animation to null. To reset to the bind pose, Skeleton_setToBindPose(node->skeleton);

Thanks! That's what I needed. I now know to look at the skeleton for any other methods.

BTW, I got an error trying to use the skeleton's boundingBox. It's not critical and when I test more and get more data I will send it to you.