CameraClient

getFinalRenderedCamRot

GET_FINAL_RENDERED_CAM_ROT0x5B4E4C817FCC2DFB

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

SignatureJavaScript
getFinalRenderedCamRot(
  rotationOrder: number
): { x: number, y: number, z: number }
SignatureLua
getFinalRenderedCamRot(rotationOrder: integer): Vector3

Usage

JavaScript
const { x, y, z } = getFinalRenderedCamRot(rotationOrder);
Lua
local coords = getFinalRenderedCamRot(rotationOrder)
-- coords.x, coords.y, coords.z

Parameters

ParameterTypeJavaScriptLua
rotationOrderintnumberinteger

Returns

Vector3 JavaScript { x: number, y: number, z: number }, Lua Vector3

A 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.

p0 seems to consistently be 2 across scripts

Function is called faily often by createCamWithParams

Reference

Namespace
Camera CAM
In the game
Vector3 GET_FINAL_RENDERED_CAM_ROT(int rotationOrder)
Hash
0x5B4E4C817FCC2DFB
Formerly
_GET_GAMEPLAY_CAM_ROT_2

Open in the interactive natives reference