- Documentation
- Shared functions
- setElementBoneRotationOffset
Function
setElementBoneRotationOffset
Changes the rotation of an element attached to a bone, without re-attaching it.
Syntax
bool setElementBoneRotationOffset(element theElement, float rx, ry, rz)Arguments
theElementelement- An element attached with
attachElementToBone. rx, ry, rzfloat- The new rotation relative to the bone in degrees.
Returns
true on success, false if the element is not attached to a bone.
Example
setElementBoneRotationOffset(box, 0, 90, 0)
See also
attachElementToBoneAttaches an element (e.g. an object) to a ped's bone, with an offset and rotation. The element moves with the bone, e.g. a hat with the head or a weapon in a hand. Bone numbers are the same as ingetBoneIDs(e.g. 1 pelvis, 8 head, 25 right hand, 35 left hand).getElementBoneRotationOffsetReturns the rotation of an element attached to a bone (in degrees).setElementBonePositionOffsetChanges the offset of an element attached to a bone, without re-attaching it. The element moves relative to the bone right away.