EntityClient

getWorldPositionOfEntityBone

GET_WORLD_POSITION_OF_ENTITY_BONE0x44A8FCB8ED227738

The GTA V native GET_WORLD_POSITION_OF_ENTITY_BONE of the ENTITY namespace, as LS:MP client scripts call it: the global function getWorldPositionOfEntityBone, in JavaScript and in Lua.

SignatureJavaScript
getWorldPositionOfEntityBone(
  entity: Entity,
  boneIndex: number
): { x: number, y: number, z: number }
SignatureLua
getWorldPositionOfEntityBone(entity: Entity, boneIndex: integer): Vector3

Usage

JavaScript
const { x, y, z } = getWorldPositionOfEntityBone(entity, boneIndex);
Lua
local coords = getWorldPositionOfEntityBone(entity, boneIndex)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
entityEntitynumberinteger
boneIndexintnumberinteger

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 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.

Returns the coordinates of an entity-bone.

Reference

Namespace
Entity ENTITY
In the game
Vector3 GET_WORLD_POSITION_OF_ENTITY_BONE(Entity entity, int boneIndex)
Hash
0x44A8FCB8ED227738

Open in the interactive natives reference