Search Unity

Question Humanoid retargeting: Make characters with different leg lengths travel the same distance?

Discussion in 'Animation' started by devpalmer, Jan 31, 2023.

  1. devpalmer


    Jul 6, 2020
    Hello hello! I'm working on a project where two customized characters have to interact in front of a fixed camera. The characters have customizable heights and use Humanoid retargeting to share animation between the different skeletons I'm using for each height. I'm working with a very bespoke animation that has all the root motion baked in (no interactive character controllers, etc), and which was authored on the tallest possible character.

    When I apply the animation to the tall character, everything looks as expected. However, the short characters' position is way off from where I'd expect, and it's worse the further away from origin the character is. You can see a similar artifact in this GDC talk about IK rigging I've been referencing:

    I'm pretty sure it's coming down to stride length--the short character has shorter legs, thus shorter distance between footfalls, ergo less distance covered. In the IK rigging video the presenter is able to compensate by increasing the character stride length relative to the distance he wants it to travel. Is there any functionality like that in Humanoid that I can leverage?

    Also, if I'm completely barking up the wrong tree and there's a simpler way to tackle this problem, I'm all ears. :) My end goal is just to have the characters in the correct root position throughout the animation so they look good relative to each other and the camera regardless of height (and minimize foot sliding/keep the IK feet locked to the ground, if possible).