• Editor
  • interpolation between two animation?

is it possible programmatic in cocos2dx to interpolate between two set of animation ? for example i have walk cycle and flying cycle, now i want the last keyframe of the walk to interpolate into the first keyframe of the fly so the transition between two animation will be smooth. is it possible by code ? or i have to make another set of animation that only has the transition.. also where can i find info on how to control bones and physics with code (like control the head tilt like in your video sample) or do a ragdoll or something... or eyelid follow and things like that (might be cool if u made a doc or a tutorial on doing those stuff)

thanks 🙂

Related Discussions
...

also was wondering if changing the root bone location to the middle of the chracter (i have a "ball shaped character) and i want the rotation to be in the middle, why its not updating in the cocos2dx ? when i use the new json file.. is the bone always only on the X 0.0 y 0.0 ? or its possilbe to change it ?

(1) It's called Mixing in the Spine runtimes and it's possible. Not sure how to do it in cocos2d. But keep an eye out for those methods that mention "Mix".

(2) I think what you're trying to do is move the pivot, which isn't possible yet. The root bone is just like any other bone: If you move it, all its children move with it.

(2.1) Moving the root bone to move your sprite isn't recommended. But that's something entirely different. Just a heads up.

AnimationState does mixing when animations are changed. See CCSkeletonAnimation.

See the coding workshop video for info on procedural animation. Jump to 0:58.