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 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.