Problem statement
Hey all,
We are having an issue where our character ‘breaks’ inside Unity - the rig and animations seem to be okay, and then our character’s bones get into wrong positions. That would result, for example, in the sword arm being ‘stuck’ in a weird place even though the character has performed the animation successfully prior, or shoulders being offset, or foot bones being ‘stuck’.
A list of the bone position problems we’re having:
- Sword/sword arm bone position breaking. This also occurs to some other parts of the character, like the hat. This usually happens after an animation is played and then the character transitions into idle animation. The bones get ‘stuck’ there. To remedy this we had to make a makeshift solution where we adjusted the animation within Spine so it works correctly in Unity.
sword attack ground up video side-by-side Unity/Spine - Google Drive
- Shoulders break seemingly because the bone responsible is not correctly flipped using scale. We double and triple checked all possible reasons to try to troubleshoot but couldn’t resolve it.
shoulder breaking video in Unity - Google Drive
- Foot bones ‘break’ when the character jumps down from a ledge, and from diagonal downward attack.
foot bones video 'breaking' - Google Drive
Specifics of the rig:
the character is assymetrical in design, meaning that we cannot just flip her horizontally when she needs to face the other way. She has a fencing cape on one shoulder, and armor on the other, and always holds her sword in her right hand.
to make it ‘flip’ properly we made two skins, left-facing and right-facing, which are used depending on the facing direction. Since the bone structure also changes, not just the image slots, we have 2 sets of arm bones for left/right facing directions. So the character has 4 arms, but only 2 are visible at one time. We initially thought this might be the culprit but after troubleshooting everything, it all flips and works correctly.
a video illustrating how the rig works - Google Drive
What we did:
Checked that everything is keyframed correctly in Spine and that keyframes exist for everything and nothing gets overwritten incorrectly when blending animations
Checked if it’s an animation track issue and tried different setups, even turning off tracks completely.
Runtime information
Tell us your Spine Runtimes version.
4.1.23