StreamingClient

setFocusPosAndVel

SET_FOCUS_POS_AND_VEL0xBB7454BAFF08FE25

The GTA V native SET_FOCUS_POS_AND_VEL of the STREAMING namespace, as LS:MP client scripts call it: the global function setFocusPosAndVel, in JavaScript and in Lua.

SignatureJavaScript
setFocusPosAndVel(
  x: number,
  y: number,
  z: number,
  offsetX: number,
  offsetY: number,
  offsetZ: number
): void
SignatureLua
setFocusPosAndVel(
  x: number,
  y: number,
  z: number,
  offsetX: number,
  offsetY: number,
  offsetZ: number
)

Usage

JavaScript
setFocusPosAndVel(x, y, z, offsetX, offsetY, offsetZ);
Lua
setFocusPosAndVel(x, y, z, offsetX, offsetY, offsetZ)

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
setFocusPosAndVel(pos, offset);
Lua · with vectors
setFocusPosAndVel(pos, offset)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
offsetXfloatnumbernumber
offsetYfloatnumbernumber
offsetZfloatnumbernumber

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.

Override the area where the camera will render the terrain.
p3, p4 and p5 are usually set to 0.0

Reference

Namespace
Streaming STREAMING
In the game
void SET_FOCUS_POS_AND_VEL(float x, float y, float z, float offsetX, float offsetY, float offsetZ)
Hash
0xBB7454BAFF08FE25
Formerly
_SET_FOCUS_AREA

Open in the interactive natives reference