CameraClient

getCamCoord

GET_CAM_COORD0xBAC038F7459AE5AE

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

SignatureJavaScript
getCamCoord(cam: Cam): { x: number, y: number, z: number }
SignatureLua
getCamCoord(cam: Cam): Vector3

Usage

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

Parameters

ParameterTypeJavaScriptLua
camCamnumberinteger

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.

Reference

Namespace
Camera CAM
In the game
Vector3 GET_CAM_COORD(Cam cam)
Hash
0xBAC038F7459AE5AE

Open in the interactive natives reference