Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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