Search Unity

Question How can I get root motion from animation clip?

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

  1. auau52

    auau52

    Joined:
    Apr 3, 2020
    Posts:
    16
    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