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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Why are my humanoid's hands crossing each other?

Discussion in 'Animation' started by yosimba2000, Oct 5, 2022.

  1. yosimba2000

    yosimba2000

    Joined:
    Jun 3, 2021
    Posts:
    24
    1. Does anyone know why my humanoid character (blue guy) is crossing his hands in this animation? The animation and rigs are all humanoid. Even Unity's auto character exhibits the same issue.
    2. The sample rig that came with the .fbx animation applies the animation correctly.
    3. https://imgur.com/a/1V9Li0V
    4. It's not IK because disabling IK in the avatar mask still shows the same issue
     
  2. Nathanieljla

    Nathanieljla

    Joined:
    Apr 18, 2014
    Posts:
    97
    I'm going to assume it's because the two character are different sizes. Someone can correct me if I'm wrong, but humanoids are simply going to rotate the joints, so the angles are correct, but if the limbs are longer they'll clip. If the limbs are short, they'll fail to reach the target. Usually you'd need to do some type of IK correction to compensate for the difference in limb lengths. For example, My characters usually have an extra bone in each hand that I label "left_item_bone" (make sure the extra bone is included in your avatar mask, or it's animations won't be imported). My weapons also have two "grip points" on the item the character holds. I label them, primary handle and secondary handle. The primary handle aligned to the hand's item bone. The secondary handle is used as a goal for the other hand's item bone to align to. The nice thing about this is if you have weapon variants with slightly different grip points, you can usually get away with using the same weapon animations, as the IK corrects misaligned hands. E.g. shotguns with different grip points.
     
  3. yosimba2000

    yosimba2000

    Joined:
    Jun 3, 2021
    Posts:
    24
    Yeah, you're correct. I changed the size of the shoulder joints and it looks 95% of the original animation. Good enough for me, thanks!
     
unityunity