GetGameplayCamRot
Docslocal retval = GetGameplayCamRot(rotationOrder)Description
This function takes a rotation order and outputs a Vector3 in degrees.
It first calls a game function to calculate these values given the rotation order and effectively multiplies those values by 180/PI, hence degrees since the function it calls outputs radians which are then converted to degrees.
Parameters
| Name | Type | Description |
|---|---|---|
rotationOrder | int | The order of rotation, see [`GET_ENTITY_ROTATION`](#\_0xAFBD61CC738D9EB9) |
Returns
Vector3Returns a 3D vector (x, y, z).
Examples
Official
local camRot = GetGameplayCamRot(0) -- vector3(-14.74518, 0.05254443, 95.24616)
Citizen.Trace(string.format("Cam Rotation is x: %f, y: %f, z: %f", camRot.x, camRot.y, camRot.z))