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

When im rotating the knee my leg is doing something weird

Discussion in 'General Discussion' started by unity_B074ACCAA43B7835550E, Apr 15, 2022.

  1. unity_B074ACCAA43B7835550E

    unity_B074ACCAA43B7835550E

    Joined:
    Apr 13, 2022
    Posts:
    6
    Im new btw
    unity 2020.3.22f1(if i need to mention) 20220416_011653.gif
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    THe "thigh" of your character has non-uniform scaling. Non-uniform scaling WILL propagate to children resulting in this effect.

    To avoid this problem, you need to design hierarchy differently. Make this sort of hierarchy for a leg:
    Code (csharp):
    1.  
    2. UpperLeg(Empty)
    3. +-UpperLegMesh
    4. +-LowerLeg(Empty)
    5.   +-LowerLegMesh
    6.  
    In this scenario, UpperLeg(Empty) and LowerLeg(Empty) should have scale of 1;1;1. And "UpperLegMesh" would be a child of "UpperLeg(Empty)" and "LowerLegMesh" would be a child of "LowerLeg(Empty)". You can scale UpperLegMesh/LowerLegMesh however you want.

    Bascically, the rule of the thumb is that you should not use non-uniform scale on objects with children.
     
  3. unity_B074ACCAA43B7835550E

    unity_B074ACCAA43B7835550E

    Joined:
    Apr 13, 2022
    Posts:
    6
    I forgot to mention
    when im doing it with the hand it doesnt happen for some reason
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    It means that either your hand does not have non-uniform scale, or it has no children.

    Click through the hierarchy and take note of elements that have different values in scale fields for x/y/z.

    Like I said - the rule of the thumb no non-uniform scaling for object that have children.
     
  5. unity_B074ACCAA43B7835550E

    unity_B074ACCAA43B7835550E

    Joined:
    Apr 13, 2022
    Posts:
    6
    tysm

    hy hand is
    head
    +body
    ++shoulder
    +++hand

    my shoulder is 1/1/1
     
  6. unity_B074ACCAA43B7835550E

    unity_B074ACCAA43B7835550E

    Joined:
    Apr 13, 2022
    Posts:
    6
    Does it matter if the empty one will be capsule or anything else?
     
  7. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,381
    If it's a capsule then it's not empty.
     
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,337
    If it is a capsule, then it is not an empty.
    An empty object is bare transform.
    So you have UpperLeg, as an empty. Then you attach LowerLeg to that, also an empty object with nothing, except at a different position. Then you attach capsule to UpperLeg and LowerLeg, as children. And position/scale them however you want.

    Like I said, the general idea is that you can't have non-uniform transforms on objects that have children.
     
  9. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,784
    When I saw this thread I immediately forgot I was on a gamedev forum and was thinking about recommending some Physical Therapy exercises. I guess I'm showing my age now :D
     
    stain2319 and MasterSubby like this.