Search Unity

Fix a joint in a Humanoid rig in an AnimationClip

Discussion in 'Animation' started by babklapper, Jun 17, 2022.

  1. babklapper


    Sep 17, 2014

    I want to modify some animations through code that I have imported, and conceptually it sounds pretty simple.
    For example, in some cases, I want the hips joint to be at the origin and stay at the origin.
    Since I don't want to hard-code rigs, I convert the animation's rig from the fbx to a Humanoid rig. This mapping allows me to map a joint to the hips. Great. However, I never get a hips channel/property in the AnimationClip. I get all the convenient channels for all the other joints, as well as Q and T properties for the Hands, Feet, and Root. But I don't necessarily care about the Root. Instead I would like to adjust one of the T curves so that the Hips stay at the origin. I know what I am doing reasonably well, I know how to modify curves, and how I can add offsets to the Root T curve to move the character around. But how do I get a hold of the hips? That's all I want (for now)... I understand I might have to add an offset to the Root T to indirectly offset the hips. But in that case, I need to at least know the location of the hips so I can calculate this relative offset