当 HumanIK 在运行时为角色创建新姿势时,它可以使用两种不同策略之一来弯曲角色的膝盖和肘部:
![]() |
如左图所示,可以像正常人弯曲那样弯曲角色。 这是 HumanIK 使用的默认弯曲策略。 |
![]() |
如左图所示,可以反方向弯曲角色。 此选项通常用于使角色具有像鸟那样移动的脚,或具有像四足动物(如狗、猫或马)的后腿。 |
要反转角色的关节,请调用 HIKInverseJoint 函数。
HIKInverseJoint(MyCharacter, HIKLeftKnee, 1); HIKInverseJoint(MyCharacter, HIKRightKnee, 1);
要确定是否已反转关节,请调用 HIKIsJointInverted 函数。
if (HIKIsJointInverted(MyCharacter, HIKLeftKnee) == 0) { ... // the joint uses the default bending direction } if (HIKIsJointInverted(MyCharacter, HIKLeftKnee) != 0) { ... // the joint is inverted }