Reversing Knees and Elbows

When HumanIK creates a new pose for your character at runtime, it can use either of two different strategies for bending your character’s knees and elbows:

 

It can bend them the way a normal human bends, as in the image on the left.

This is the default bending strategy used by HumanIK.

 

It can bend them in the opposite direction, as in the image on the left.

This option is most often used to make a character with legs that move like a bird, or like the back legs of a quadruped such as a dog, cat or horse.

You can set the bending axis for each of your character’s elbows and knees separately.

Inverting joints

To invert a joint for your character, call the HIKInverseJoint function.

For example:

HIKInverseJoint(MyCharacter, HIKLeftKnee, 1);
HIKInverseJoint(MyCharacter, HIKRightKnee, 1);

Testing joint inversions

To determine whether or not a joint is inverted, call the HIKIsJointInverted function.

For example:

if (HIKIsJointInverted(MyCharacter, HIKLeftKnee) == 0)
{ 
   ...   // the joint uses the default bending direction 
}
if (HIKIsJointInverted(MyCharacter, HIKLeftKnee) != 0)
{ 
   ...   // the joint is inverted 
}

Streaming and saving characters

Your character’s joint inversions are included when you write the character to a binary stream using the HIKWriteToStream() function, but not when you dump your character to a file using the HIKSaveCharacter() function.