Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Humanoid: dynamicaly change bone length

Discussion in 'Animation' started by dozhwal, Jul 27, 2019.

  1. dozhwal


    Aug 21, 2014

    i must be stupid but i don't find any information about changing bone length dynamicaly.

    I like mecanim because we can use any existant animation and it works well.
    I know we must set an avatar by character, and we can retargeting. Humanoid animation saves rotation relative to parent only. and no rotation or scales to achieve that.

    But now, i try to make a dynamic runtime character, on which you can change clothes, blendshapes (fat, thin, man, woman,..) and i want to change bone length !

    How to do that with mecanim ?
    I tried some things :
    - change bone size : it changes the hierarchy
    - add a dummy at the end of arm/leg bones. change scale of bone. set the scale of the dummy at inverse scale of the parent bone. : it seems pretty okay but when i change thigh size, the character floats in air. (do i must change root position ? ) And it thinks that those extra transforms points are not good for performance.
    Or maybe, i should use "HumanBone" and "HumanLimit" thing ? But i can't find any example on the web.

    Thanks for your answer :)
  2. dozhwal


    Aug 21, 2014
    Nobody have this usecase ? o_O
  3. snacktime


    Apr 15, 2013
    It's a very common thing but it's rather advanced. The basic technique is create child bones and those are the ones you deform. But there is a LOT more to it you need a solid understanding of rigging and bone weights to do it yourself, and you need modeling software like blender.

    I suggest downloading UMA it does bone deformations like you want.
    dozhwal likes this.