CameraClient

getGameplayCamCoord

GET_GAMEPLAY_CAM_COORD0x14D6F5678D8F1B37

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

SignatureJavaScript
getGameplayCamCoord(): { x: number, y: number, z: number }
SignatureLua
getGameplayCamCoord(): Vector3

Usage

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

Parameters

None.

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_GAMEPLAY_CAM_COORD()
Hash
0x14D6F5678D8F1B37

Open in the interactive natives reference