getEntityBoneRotation
GET_ENTITY_BONE_ROTATION0xCE6294A232D03786The GTA V native GET_ENTITY_BONE_ROTATION of the ENTITY namespace, as LS:MP client scripts call it: the global function getEntityBoneRotation, in JavaScript and in Lua.
getEntityBoneRotation(
entity: Entity,
boneIndex: number
): { x: number, y: number, z: number }getEntityBoneRotation(entity: Entity, boneIndex: integer): Vector3Usage
JavaScript
const { x, y, z } = getEntityBoneRotation(entity, boneIndex);Lua
local coords = getEntityBoneRotation(entity, boneIndex)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
boneIndex | int | number | integer |
Returns
Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3A 3D vector. JavaScript gets a plain { x, y, z } object; Lua gets a real Vector3, with .x .y .z and arithmetic. As an argument, one vector fills three consecutive coordinates.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Gets the world rotation of the specified bone of the specified entity.
Reference
- Namespace
- Entity ENTITY
- In the game
Vector3 GET_ENTITY_BONE_ROTATION(Entity entity, int boneIndex)- Hash
0xCE6294A232D03786- Introduced
- Game build 791 legacy numbering
- Formerly
_GET_WORLD_ROTATION_OF_ENTITY_BONE_GET_ENTITY_BONE_ROTATION