Search Unity

Is there any method to manipulate a Humanoid muscle by API?

Discussion in 'Animation' started by TMPxyz, Sep 11, 2015.

  1. TMPxyz

    TMPxyz

    Joined:
    Jul 20, 2012
    Posts:
    766
    Hi, Developers,

    I want to manipulate the model by muscle instead of joint rotation in runtime, like in the Muscle definition inspector.

    like:
    Animator.SetMuscle("Spine Front-back", 0.7f);

    Is there some internal API to do this?
     
    lacas8282 likes this.
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi TMPxyz,

    unfortunately not in 5.2.
    This is a new utility class in 5.3 call HumanPoseHandler that allow you to read and write a human pose for an avatar.
    You could use it in a MonoBehaviour.LateUpdate to modify the blended animation from the controller.

    The goal of this feature was to give access to the human retargeter for user doing live mocap in unity, from a FK pose animated from a mocap device you can get the muscle value and create an Humanoid animation clip with curve.
     
  3. TMPxyz

    TMPxyz

    Joined:
    Jul 20, 2012
    Posts:
    766
    Thanks, Mecanim.Dev,

    Glad to hear that, will check it out in 5.3,
     
  4. The-Little-Guy

    The-Little-Guy

    Joined:
    Aug 1, 2012
    Posts:
    297
  5. winxalex

    winxalex

    Joined:
    Jun 29, 2014
    Posts:
    166
  6. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    138
    Any news in this?

    humanposehandler and sehHumanpos not working in the newest unity, 2020. Any news how to create anim clips with muscles?