Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question Changing character proportions at runtime - editing avatar? Animation Rigging solution?

Discussion in 'Animation' started by DDobyns, Sep 7, 2020.

  1. DDobyns

    DDobyns

    Joined:
    Jan 28, 2018
    Posts:
    7
    I'm trying to build animated (humanoid) characters that can have limbs/components swapped out at runtime with mixed and matched parts which can have a variety of proportions. My current leading idea is to try to modify the character's rig at runtime, moving a bone transform to stretch/shrink the dimensions of an arm or leg bone, etc., but I haven't found clear examples of how to do this. I'd like to be able to modify all proportions of a humanoid rig/avatar, including things like shoulder width.

    Is this something that I can do with AvatarBuilder.BuildHumanAvatar? I'm also using the new Animation Rigging solution for IK; is there a better approach using new Animation Rigging features to get my humanoid animations to work with characters that can change proportion at runtime?

    I was hoping that I could start with a "default avatar" and modify bone transforms at runtime (using avatar.humanDescription.skeleton.SkeletonBone.position), but that doesn't seem to change the avatar at runtime.