I am having an issue while using spine animation in cocos2dx. Here is the code
skeletonNode = new CCSkeletonAnimation("Snake.json", "Snake.atlas");
skeletonNode->setAnimation("Walk", true);
skeletonNode->setScale(1.0);
skeletonNode->setSlotsToSetupPose();
CCSize windowSize = CCDirector::sharedDirector()->getWinSize();
skeletonNode->setPosition(ccp(windowSize.width / 2, windowSize.height/2));
addChild(skeletonNode);
skeletonNode->release();
now when i change using add animation method, then for a second,it flickers while changing animation. I also tried clear animation before adding new animation but same problem.
this is how i change animation
skeletonNode->setSlotsToSetupPose();
skeletonNode->addAnimation("Sleep", true);
i can not understand why it flickers. Please help me.
When you add new animation to current frame it can't sync. with last frame.
so you should mix animation instead of add a new animation i.e.