Sorry, your image shows a 404 error.
A quick summary: When blending between 2 rotations, either direction could be considered correct. We have to pick one, so we pick the shortest rotation. Note that while playing animations the shortest direction can change, since the rotation from each of the animations could be changing over time. To avoid suddenly changing rotation direction, we stick with the first direction that is chosen.
While it does happen, it isn't actually very often that the wrong direction is chosen. Unfortunately we don't yet have a way to control this. It's not easily avoided, as it's not just about forcing a single direction of rotation. Either direction of rotation could be correct, depending on the poses of the skeletons. Fixing it would need some way of identifying one of the directions as being incorrect. Likely we'd need a way to define a section of the local rotation that is disallowed, then rotation blending could avoid blending in the direction that would go through that section.
For now the easiest solution may be to adjust the animations until it doesn't happen anymore.
Without knowing which direction is the "incorrect" direction, a code-based solution isn't possible, but FWIW the code involved is in AnimationState applyRotateTimeline
. Remembering the originally chosen direction is somewhat complex, as it has to handle the rotations changing over time, including when they cross (I have nightmares from this). It's stored in timelinesRotation
and technically could be adjusted, but again the problem is in knowing which direction is the correct direction.
TrackEntry resetRotationDirections
resets the chosen rotation directions, which can be useful when using TrackEntry alpha
or to have a long running animation choose the direction again.