Native referenceFiveM

GET_CAM_ROT

0x7D304C1C955E3E12 CAM
FUNCTION SIGNATURE
Vector3 GET_CAM_ROT(Cam cam, int rotationOrder);
Property Value
Native Name GET_CAM_ROT
Hash 0x7D304C1C955E3E12
Return Type Vector3
Parameters cam (Cam), rotationOrder (int)

Description: Gets a camera's rotation by handle (cam) lookup, outputs a Vector3 in degrees.

Parameters

  • cam (Cam) — The camera handle.
  • rotationOrder (int) — The order of rotation, see GET_ENTITY_ROTATION

Examples

-- We need a valid camera handle for this to work.
local theCamHandle = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)

-- Let's set the camera rotation for illustrative purposes
SetCamRot(theCamHandle, 0.1, 0.2, 0.3, 0)

-- We are now able to get the camera rotation.
local camRot = GetCamRot(theCamHandle, 0) -- vector3(0.100000, 0.200000, 0.300000)
Citizen.Trace(string.format("Cam Rotation is x: %f, y: %f, z: %f", camRot.x, camRot.y, camRot.z))
Back to CAM