void SET_IK_TARGET(Ped ped, int ikIndex, Entity entityLookAt, int boneLookAt, float offsetX, float offsetY, float offsetZ, int ikTargetFlags, int blendInDuration, int blendOutDuration);
Parameters:- ped:
The ped handle.
- ikIndex:
See eIkPart for indexes.
- entityLookAt:
Set to 0 for no entity, offsets will be world coordinates instead.
- boneLookAt:
Set to -1 for no target bone.
- offsetX:
X-axis offset calculated from the position of entityLookAt.
- offsetY:
Y-axis offset calculated from the position of entityLookAt.
- offsetZ:
Z-axis offset calculated from the position of entityLookAt.
- ikTargetFlags:
See eIkTargetFlags for flags.
- blendInDuration:
Animation blending in (in ms). -1 by default.
- blendOutDuration:
Animation blending out (in ms). -1 by default.
Sets the IK target for a given IK part belonging to the ped.
Please note: The IK target will only be valid for one update, so it needs to be set for as long as it is needed (to avoid IK targets not being cleared and getting stuck enabled).
enum eIkPart {
IK_PART_INVALID = 0,
IK_PART_HEAD = 1,
IK_PART_SPINE = 2,
IK_PART_ARM_LEFT = 3,
IK_PART_ARM_RIGHT = 4,
IK_PART_LEG_LEFT = 5,
IK_PART_LEG_RIGHT = 6
};
enum eIkTargetFlags {
ITF_DEFAULT = 0,
ITF_ARM_TARGET_WRT_HANDBON = 1,
ITF_ARM_TARGET_WRT_POINTHELPER = 2,
ITF_ARM_TARGET_WRT_IKHELPE = 4,
ITF_IK_TAG_MODE_NORMAL = 8,
ITF_IK_TAG_MODE_ALLOW = 16,
ITF_IK_TAG_MODE_BLOCK = 32,
ITF_ARM_USE_ORIENTATION = 64
};
NativeDB Introduced: v323