Search Unity

SetHumanPose issue

Discussion in 'Animation' started by roumenf, Mar 23, 2017.

  1. roumenf

    roumenf

    Joined:
    Dec 12, 2012
    Posts:
    635
    Hi,

    I have the following issue: I animated a humanoid model in a scene, by setting its transform's position and rotation, as well as the rotations of its bones. So far, so good. Then I tried to limit the animated pose to the model's muscle limits. To do it I used GetHumanPose() and SetHumanPose(). Unfortunately, apart of the muscle values, the humanPose contains bodyPosition & bodyRotation-fields too. Their values remained unchanged, but after SetHumanPose() was called, the model's hip position and rotation were changed, which was a bit unexpected. I have two questions:

    1. How should I set the values of bodyPosition & bodyRotation before calling SetHumanPose(), so that the position and rotation of the model's hip remain unchanged? By the way, is this a bug or the expected behavior of this function?

    2. Can you elaborate on how exactly the muscle values are converted to bone orientations? This would be an alternative to using SetHumanPose(). As to the Mecanim humanoid documentation, "this phase is straight forward".
     
  2. roumenf

    roumenf

    Joined:
    Dec 12, 2012
    Posts:
    635
    Thanks. Found it out by myself.
     
  3. BernieRoehl

    BernieRoehl

    Joined:
    Jun 24, 2010
    Posts:
    80
    I'm running into the same problem. What was your solution?
     
  4. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    @roumenf

    Might be nice to share your solution to this -- there's ZERO documentation about this issue, and I'm having issues with this as well.
     
  5. roumenf

    roumenf

    Joined:
    Dec 12, 2012
    Posts:
    635
    Please see the other thread.
     
    awesomedata likes this.