When animations are on two tracks and mixed using TrackEntry alpha
, the rotation for a bone from each track needs to be combined. How do we choose some percentage between rotations? It could be eg 25% around one way, or 25% around the other. We choose the shortest direction the first time the mixing happens and remember it, then use that direction for the rest of the mix. We do that because the rotations being mixed are animating, so which way is shorter can change and we don't want bones flipping to the other side mid-animation.
What happens for you is the initial direction that is chosen ends up not being the best direction for the rest of the animation. In other words, the bones are rotated the short way around at first, but then your bones rotate a lot, so that direction becomes the long way around and then your bones are pointed 180 degrees from the direction you want them.
We revisited the problem, but unfortunately there's not a great solution. The best we can do is provide an alternative way of mixing rotation. We could always choose the shortest rotation direction, without remembering the initial direction. This happens to work better for your particular animations. We'll start by making this an option at runtime, then the Preview view will need a setting for it somewhere.
Another option you have, and can do now, is to use additive animation, which doesn't have this problem:
Preview view - Spine User Guide: Additive
The runtime setting is TrackEntry setShortestRotation
. It's in the 4.1-beta branch for the spine-libgdx runtime, will be in the others soon.
If true, mixing rotation between tracks always uses the shortest rotation direction. If the rotation is animated, theshortest rotation direction may change during the mix.
If false, the shortest rotation direction is remembered when the mix starts and the same direction is used for the restof the mix. Defaults to false.