Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question bone positions not moving

Discussion in 'Animation' started by valveCorpHype, Jul 3, 2021.

  1. valveCorpHype

    valveCorpHype

    Joined:
    Jul 5, 2018
    Posts:
    14
    In a part of my code, I need to manually adjust the bone positions of my character.

    Code (CSharp):
    1.  
    2. Transform hips = _controller.transform.Find("rig/Character/Hips");
    3. hips.Translate(Vector3.down*2, Space.World);
    4.  
    The translation isn't being done, presumably because the animator is in control. I then disabled the animator

    Code (CSharp):
    1.  
    2. animator.enabled=false;
    3. Transform hips = _controller.transform.Find("rig/Character/Hips");
    4. hips.Translate(Vector3.down*2, Space.World);
    5. animator.enabled=true;
    6.  
    , but the translation still isn't being done. Is this expected behaviour? What am I doing wrong?
     
  2. valveCorpHype

    valveCorpHype

    Joined:
    Jul 5, 2018
    Posts:
    14
    Nevermind I figured it out