Yes. Instead of letting the hit animation end (eg via TrackEntry trackEnd
), you queue an empty animation. See AnimationState setEmptyAnimation
. Eg:
state.setAnimation(0, "walk", true);
state.setEmptyAnimation(1, 0);
state.addAnimation(1, "run", true, 0).mixDuration = 1.5f;
state.addEmptyAnimation(1, 2.5f, 3);
This plays walk
on track 0, then after 1 second it mixing in run
on track 1 over 1.5 seconds. Then 3 seconds later it mixes out run
on track 1 over 2.5 seconds. Mixing out run
leaves walk
on track 0.