An IK pivot is an imaginary point in three-dimensional space around which an Effector rotates. You can use these IK pivots to increase the realism of animations that involve rotating a joint around an external point in space. For example:
When you set an IK pivot for an Effector, you provide its 3D translation in global space at the same time as you provide global translation, orientation and scaling values for the Effector itself. The IK pivot modifies the way HumanIK takes into account the translation and orientation values for the Effector, effectively creating a new IK goal point.
This final IK goal point is calculated by the following process:
Looked at in another way, the translation values you specify for the Effector and the pivot point define two points at the ends of an imaginary line with a fixed length. When the pivot point is rotated to the orientation you specify for the Effector, this imaginary line is also rotated, effectively moving the Effector to another location in 3D space.
Any IK constraints (Reach, Pull and Resist) set for an Effector apply normally when using an IK pivot, controlling how closely the character’s skeleton comes to this IK goal point in the final solution, and how much the rest of the character’s skeleton may be deformed to reach that point.
To set an IK pivot for an Effector, you can call either of the HIKSetEffectorPivotStatefv() or HIKSetEffectorPivotStateTQSfv() functions. Both of these functions expect you to provide the translation of the IK pivot in an array of four floating-point values.
const float pivotPointT[] = {124.3f, 253.8f, 604.4f, 0.0f};
HIKSetEffectorPivotStateTQSfv(myEffectorSet, LeftWristEffectorId, globalT,
globalQ,
globalS,
pivotPointT);You can retrieve the position of the IK pivot using the corresponding HIKGetEffectorPivotStatefv() and HIKGetEffectorPivotStateTQSfv() functions.
For details, see the function descriptions in the API Reference.