To enable the new Root Motion feature in Spine, you need to follow these steps:
Download the Latest spine-unity Package: Ensure you have the latest version of the spine-unity package. You can download it from Spine Unity Download.
Add the SkeletonRootMotion Component: Attach the SkeletonRootMotion
component to your skeleton GameObject in Unity. This component is responsible for handling root motion.
Configure the Component:
- Root Motion Bone: Set the target bone whose movement will be used as root motion.
- X and Y: Enable movement along the local X and Y axes as needed.
- Root Motion Scale (X and Y): Adjust the scale for horizontal and vertical root motion delta to compensate for any required adjustments.
- Animation Tracks: Specify which animation tracks should be included in root motion calculations.
For detailed instructions, you can refer to the spine-unity Runtime Documentation: SkeletonRootMotion.
Here is a visual representation of the SkeletonRootMotion
component parameters:
By following these steps, you should be able to activate and configure the root motion feature as described in the blog.