For root motion in Spine, you'll want to add a dedicated bone in your skeleton hierarchy specifically for capturing movement. Here's how to approach your setup:
Choosing the Root Motion Bone
The key principle is that your root motion bone needs to have local movement relative to its parent bone. This movement can come from:
- Applied animations
- Transform constraints
Recommended Setup
For a humanoid character performing the actions you described (running, jumping, sliding, rolling, etc.), I'd recommend this hierarchy:
- Root bone - The actual skeleton root, stays at the origin
- Hip/Body bone - This serves as the main body control and should be the parent of your body hierarchy (legs, torso, etc.)
- Root motion bone - A child of the root bone that either:
- Directly animates to follow your character's movement, OR
- Uses a Transform Constraint to follow your hip/body bone's position
Why This Structure?
Using a dedicated root motion bone as a child of root (separate from your hip bone) is beneficial because:
- Your legs can use IK constraints that target bones at the same hierarchy level as the hip
- Moving the hip won't inadvertently move IK target bones
- The root motion bone can accumulate all movement relative to the skeleton origin
Setup Approach
If you want to use your hip/body bone for animation but need root motion data relative to root, you can:
- Create a
root-motion bone as a child of root
- Use a Transform Constraint to make this
root-motion bone follow your hip/body bone's location
- This way, the
root-motion bone captures all cumulative movement in relation to its parent
This setup will work well for all the actions you mentioned, as the root motion bone will properly capture the positional changes during runs, jumps, slides, and throws.