Following bone position during animation

I’m trying to get GameObjects to follow certain bones on my character (for example, always be exactly some distance in front of its foot), under certain conditions (so I don’t just want to make it a child). I currently do this by getting the transform of the bone using Transform.Find() at runtime. However, this transform ignores the movement of the bone during animations, e.g. the transform of a character’s foot bone will not go back and forth with the foot’s movement during running, but will stay fixed with regard to the character’s position.

Is there any way to get the current position of a bone while an animation is playing?

Solved it. I was using transform.localPosition which is apparently fixed, while transform.position is not. Subtracting the character’s global position from the bone’s global position gave me what I was looking for.

Hi,

Unfortunately I also get the same position. I am using:

GameObject arm = GameObject.Find("mixamorig:RightArm");
        if (arm == null)
            UnityEngine.Debug.LogError("Arm not found");
        else
        {
            UnityEngine.Debug.LogError("ARM found");
            UnityEngine.Debug.Log("Arm position:" + arm.transform.position);
        }