Search Unity

Question Issue with changing leg bone length while using IK feet

Discussion in 'Animation' started by Nikuras, Nov 26, 2020.

  1. Nikuras

    Nikuras

    Joined:
    Aug 23, 2015
    Posts:
    4
    Hello! I am trying to make a character that I can adjust the proportions of (changing arm length and leg length for example), so I can have one base character that can easily be adjusted in order to create several other characters.

    Although when I added foot IK to the mixture I ran into some issues - Unity doesn't seem to take the modified bone lengths into consideration when positioning the IK. So the result is that the foot becomes offset from the IK target.

    not extended.png
    This is the leg in its original length.

    extended.png
    This is the leg when the bones have been stretched. The red lines indicate what I want to achieve.

    I might have to resort to other solutions but I really hope I'll get this working. Any help is appreciated!
     
  2. Nikuras

    Nikuras

    Joined:
    Aug 23, 2015
    Posts:
    4
    Just a note in case someone stumbles upon this in the future: The issue was that the character was still using the original Avatar assigned in the import settings, so the animation system didn't know that the size of the leg had changed. The solution was to get all the position data from the joints in the modified character skeleton and use AvatarBuilder.BuildHumanAvatar to create a new avatar in runtime.
     
    kdgalla and jozhard like this.