• RuntimesUnity
  • Root Motion suddenly stopped working in Unity with Spine

Hi, I'm having trouble with root motion suddenly not working.

Previously, I was able to move the character using root motion simply by checking “Apply Root Motion” on the Animator. For example, during a dash animation, the character would move correctly based on the root bone movement.
However, now even though the animation still plays correctly, the character no longer moves — it just stays in place or snaps back to the original position.
・I'm using SkeletonMecanim
・The root bone definitely has position keyframes
・The correct animation is set in the Animator state
“Apply Root Motion” is enabled
I’m not sure what caused this to stop working. If anyone has any ideas or advice, I’d really appreciate it. Thank you!

Related Discussions
...

It seems like you are experiencing issues with root motion in Unity using Spine's SkeletonMecanim. Here are a few things you can check to troubleshoot the problem:

  1. SkeletonMecanimRootMotion Component: Ensure that you have the SkeletonMecanimRootMotion component attached to your GameObject. This component is necessary for root motion to work with SkeletonMecanim. You can find more information about this component here.

  2. Root Motion Bone Setup: Double-check that the root motion bone is correctly set up in your skeleton. The root motion bone should be the one moving during the animation, and it should be correctly configured in the SkeletonMecanimRootMotion component.

  3. Animator Settings: Verify that the "Apply Root Motion" option is indeed checked in the Animator component. Sometimes, changes in the Animator or the hierarchy can affect this setting.

  4. Animation Keyframes: Ensure that the root bone has the correct position keyframes in the animation. If the keyframes are missing or incorrect, the root motion will not work as expected.

  5. Hierarchy and Constraints: Check if there are any constraints or hierarchy changes that might affect the root motion. For example, if the root bone is constrained or if there are parent bones with unexpected transformations, it could interfere with the root motion.

If these steps do not resolve the issue, consider creating a minimal test project to isolate the problem. This can help identify if the issue is with the specific setup or a broader configuration problem.

  • Vein ответили на это сообщение.

    Spinebot
    Thanks, it's working now!
    I added the SkeletonMecanimRootMotion component as suggested, and root motion started working again.
    Previously it worked without that component, so I didn't realize it was required. Appreciate the help!

    • Harald ответили на это сообщение.
    • Misaki оценил это.

      @Vein Glad to hear you've figured it out. Please note that the SkeletonMecanim component Inspector automatically detects whether Apply Root Motion is enabled at the Animator component and then adds a SkeletonMecanimRootMotion component to the GameObject.

      I'm not quite sure how you managed to have Apply Root Motion enabled but the SkeletonMecanimRootMotion not automatically re-added even if deleted, but I guess it must have been a combination of unsaved scene or prefab state and not selecting the GameObject or something like that.

      If you can share reproduction steps how you can enable Apply Root Motion but not have a SkeletonMecanimRootMotion added, please do let us know, we would be happy to fix this. If the GameObject is not selected it won't be possible however, as it's the SkeletonMecanim Inspector code which evaluates the situation.

      Vein Previously it worked without that component

      It didn't work without the component, you might just not have noticed that it was automatically added.

      • Vein ответили на это сообщение.
      • Vein оценил это.

        Harald
        Thanks! That makes sense now.

        I must have overlooked that the SkeletonMecanimRootMotion component was being added automatically before.
        At the time it stopped working, I noticed it was missing, so I assumed it had worked without it before — but you're right, I probably just didn't notice it had already been added.

        Appreciate the clarification!