Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How can I get root motion from animation clip?

Discussion in 'Animation' started by auau52, Sep 3, 2021.

  1. auau52


    Apr 3, 2020
    To prevent XY problem, let me explain my situation. I'm using fbx animation with only Root Transform Position (XZ) bake Into Pose unchked. So does XZ motion be applied to my root object.
    But my weapon(attachment) is animates weird.

    If I turn on Bake Into Pose on XZ position as well or un-parent weapon from the root, it works without any problem. (maybe this is link constraint issue)

    So my approch was; after import fbx, read the clip and apply inverse XZ root motion to weapon key frames.
    I found Animator.Root T in the clip and thought is the root motion. (I was happy then) But it wasn't.

    How can I get root transform without playing animator?
    Thanks in advance!

    upload_2021-9-3_20-0-55.png upload_2021-9-3_20-0-25.png