CameraClient

setCamRot

SET_CAM_ROT0x85973643155D0B07

The GTA V native SET_CAM_ROT of the CAM namespace, as LS:MP client scripts call it: the global function setCamRot, in JavaScript and in Lua.

SignatureJavaScript
setCamRot(
  cam: Cam,
  rotX: number,
  rotY: number,
  rotZ: number,
  rotationOrder: number
): void
SignatureLua
setCamRot(
  cam: Cam,
  rotX: number,
  rotY: number,
  rotZ: number,
  rotationOrder: integer
)

Usage

JavaScript
setCamRot(cam, rotX, rotY, rotZ, rotationOrder);
Lua
setCamRot(cam, rotX, rotY, rotZ, rotationOrder)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
setCamRot(cam, rot, rotationOrder);
Lua · with vectors
setCamRot(cam, rot, rotationOrder)

Parameters

ParameterTypeJavaScriptLua
camCamnumberinteger
rotXfloatnumbernumber
rotYfloatnumbernumber
rotZfloatnumbernumber
rotationOrderintnumberinteger

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.

Sets the rotation of the cam.
Last parameter unknown.

Last parameter seems to always be set to 2.

Reference

Namespace
Camera CAM
In the game
void SET_CAM_ROT(Cam cam, float rotX, float rotY, float rotZ, int rotationOrder)
Hash
0x85973643155D0B07

Open in the interactive natives reference