getCamRot
GET_CAM_ROT0x7D304C1C955E3E12The GTA V native GET_CAM_ROT of the CAM namespace, as LS:MP client scripts call it: the global function getCamRot, in JavaScript and in Lua.
getCamRot(
cam: Cam,
rotationOrder: number
): { x: number, y: number, z: number }getCamRot(cam: Cam, rotationOrder: integer): Vector3Usage
JavaScript
const { x, y, z } = getCamRot(cam, rotationOrder);Lua
local coords = getCamRot(cam, rotationOrder)
-- coords.x, coords.y, coords.zParameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
cam | Cam | number | integer |
rotationOrder | 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.
The last parameter, as in other "ROT" methods, is usually 2.
Reference
- Namespace
- Camera CAM
- In the game
Vector3 GET_CAM_ROT(Cam cam, int rotationOrder)- Hash
0x7D304C1C955E3E12