Hey, I've been working with spine and the libgdx runtime and I want to do the following:
I have a standby animation looping and when I touch the screen I want to display another animation.
But the step between both animations is huge and it have to be smoothed. So I took a look at the MixTest included with the runtime, and it does what I wanted, smooth transitions between animations. But is kinda tricky because I've tried a lot of tweaks with the time and I can't still get it working. I've tried that:
if(touched && time < 0.5f){ // the transition
standbyAnimaton.apply(skeleton, time, true);
touchedAnimation.mix(skeleton,time,false,time/0.5f);
}
else if (touched){ // the touched animation
touchedAnimation.apply(skeleton, time, true);
}
else{ // the standby animation
standbyAnimaton.apply(skeleton, time, true);
}
Note: in the touch event I reset the time.