I'm having trouble with the new mixing/blending.
My game script applies animation state data in the following order:
DefaultBlend : { duration : 0.2 } , /* Default must be first */
Blend : { from : "jump", to : "walk", duration : 0.400000 } ,
Blend : { from : "jump", to : "run", duration : 0.400000 } ,
Scene : { name : "idle", loop : true } ,
Chain : { name : "chain1",
Scene : { name : "walk", loop : true, delay : 0 } ,
Scene : { name : "jump", loop : false, delay : 0 } ,
Scene : { name : "run", loop : true, delay : 0 } ,
Scene : { name : "jump", loop : false, delay : 3 } ,
Scene : { name : "walk", loop : true, delay : 0 } ,
Scene : { name : "idle", loop : true, delay : 1 }
}
DefaultBlend loops over and applies to->from for all animations, plus it sets 'defaultBlend' parameter of the animation data.
Blend sets a specific blend time for to->from animations.
Chain is a sequence of animations that are applied in the following manner:
std::vector<SceneChain>::iterator itr = mSceneChains[aSequenceID].begin(), end = mSceneChains[aSequenceID].end();
if(itr != end) // set the first animation
{
spAnimationState_setAnimationByName(pAnimationState, track, itr->mSceneName.c_str(), itr->bLoop);
++itr;
mCurrentSequence = aSequenceID;
}
for (; itr != end; ++itr) // add the rest into the animation queue
{
spAnimationState_addAnimationByName(pAnimationState, track, itr->mSceneName.c_str(), itr->bLoop, itr->mDelay);
}
And everything is updated:
spSkeleton_update(pSkeleton, theFrac);
spAnimationState_update(pAnimationState, theFrac);
spAnimationState_apply(pAnimationState, pSkeleton);
I'm testing on the latest spineboy example
VIDEO
I have read Set + AddAnimation Behaviour bugged? and several associated topics.
Question : What is the new method for mixing animations?