CameraClient

addCamSplineNode

ADD_CAM_SPLINE_NODE0x8609C75EC438FB3B

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

SignatureJavaScript
addCamSplineNode(
  camera: Cam,
  x: number,
  y: number,
  z: number,
  xRot: number,
  yRot: number,
  zRot: number,
  length: number,
  smoothingStyle: number,
  rotationOrder: number
): void
SignatureLua
addCamSplineNode(
  camera: Cam,
  x: number,
  y: number,
  z: number,
  xRot: number,
  yRot: number,
  zRot: number,
  length: integer,
  smoothingStyle: integer,
  rotationOrder: integer
)

Usage

JavaScript
addCamSplineNode(camera, x, y, z, xRot, yRot, zRot, length, smoothingStyle, rotationOrder);
Lua
addCamSplineNode(camera, x, y, z, xRot, yRot, zRot, length, smoothingStyle, 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
addCamSplineNode(camera, pos, rot, length, smoothingStyle, rotationOrder);
Lua · with vectors
addCamSplineNode(camera, pos, rot, length, smoothingStyle, rotationOrder)

Parameters

ParameterTypeJavaScriptLua
cameraCamnumberinteger
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
xRotfloatnumbernumber
yRotfloatnumbernumber
zRotfloatnumbernumber
lengthintnumberinteger
smoothingStyleintnumberinteger
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.

I filled p1-p6 (the floats) as they are as other natives with 6 floats in a row are similar and I see no other method. So if a test from anyone proves them wrong please correct.

p7 (length) determines the length of the spline, affects camera path and duration of transition between previous node and this one

p8 big values ~100 will slow down the camera movement before reaching this node

p9 != 0 seems to override the rotation/pitch (bool?)

Reference

Namespace
Camera CAM
In the game
void ADD_CAM_SPLINE_NODE(Cam camera, float x, float y, float z, float xRot, float yRot, float zRot, int length, int smoothingStyle, int rotationOrder)
Hash
0x8609C75EC438FB3B

Open in the interactive natives reference