Search Unity

Question [SOLVED] Squashed Joint when animating using obj.Transform.rotation = quaternion

Discussion in 'Animation' started by pacuum, Dec 8, 2023.

  1. pacuum

    pacuum

    Joined:
    Apr 14, 2016
    Posts:
    5
    I am new to Unity.

    We made a simple human 3d model and try to animate it based on the pose estimated by mediapipe.
    To do this we calculate the quaternion of each bone and set to obj.Transform.rotation.

    However, when we do this, all the joints of the human model are squashed like in the picture.
    We are stuck for days.
    I tried to search but could not find a solution.

    Can anyone give us any reference?

     
  2. pacuum

    pacuum

    Joined:
    Apr 14, 2016
    Posts:
    5
    attached is the screenshot
     

    Attached Files:

  3. pacuum

    pacuum

    Joined:
    Apr 14, 2016
    Posts:
    5
    the issue was in our code that the quaternion's angle along the axis was 180 degree flipped.
    after fixing the bug everything is fine now.