setEntityRotation
SET_ENTITY_ROTATION0x8524A8B0171D5E07The GTA V native SET_ENTITY_ROTATION of the ENTITY namespace, as LS:MP client scripts call it: the global function setEntityRotation, in JavaScript and in Lua.
setEntityRotation(
entity: Entity,
pitch: number,
roll: number,
yaw: number,
rotationOrder: number,
p5: boolean
): voidsetEntityRotation(
entity: Entity,
pitch: number,
roll: number,
yaw: number,
rotationOrder: integer,
p5: boolean
)Usage
JavaScript
setEntityRotation(entity, pitch, roll, yaw, rotationOrder, p5);Lua
setEntityRotation(entity, pitch, roll, yaw, rotationOrder, p5)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entity | Entity | number | integer |
pitch | float | number | number |
roll | float | number | number |
yaw | float | number | number |
rotationOrder | int | number | integer |
p5 | BOOL | boolean | boolean |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
rotationOrder refers to the order yaw pitch roll is applied
value ranges from 0 to 5. What you use for rotationOrder when setting must be the same as rotationOrder when getting the rotation.
Unsure what value corresponds to what rotation order, more testing will be needed for that.
For the most part R* uses 1 or 2 as the order.
p5 is usually set as true
Reference
- Namespace
- Entity ENTITY
- In the game
void SET_ENTITY_ROTATION(Entity entity, float pitch, float roll, float yaw, int rotationOrder, BOOL p5)- Hash
0x8524A8B0171D5E07