• Unity
  • Mixing not working.

Related Discussions
...

So this issue has just come up and I can't tell if I am setting up the animations wrong or if it's just the way the mixing works.

In this case we have:
Animation 1 - Our character jumps and grabs a ledge and hangs there until the player gives input for them to climb up or drop down.
Animation 2 - Our character hangs on the edge, occasionally blinking while their hair gently moves. This animation loops.

What we want to happen is to play animation one, and when it hits the last frame do the default mix of 0.2s to the second looping animation. As of right now that doesnt happen, there is a clear popping and no mixing occurring. Is this a bug? Or is this because the first animation finished and it's not transitioning from the current positions to the new positions?

I've not had issues mixing from one looping animation to another before, but I now realize in all those cases the first animation was looping vs playing once. Is there any simple way to do this or do I need to create a third animation that loops and plays after the first animation finishes but is long enough to create a transition time to mix to the second animation?

I think the "popping" happens when the two animations don't have a perfectly similar set of keyed items, particularly when animation 2 has items that animation 1 doesn't.

I recommend testing this implementation: https://gist.github.com/pharan/77c8ab0880c33716acb8 (Replace your AnimationState.cs with that code.)
and see if that fixes the popping.

If ever you want to revert to the original AnimationState, make a backup of it, or get a copy of it here: https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-csharp/src/AnimationState.cs

The cause of the popping could also be a number of other things though. Screenshots of your dopesheet with animation1 and animation2 would also be informative.