CameraClient

isSphereVisible

IS_SPHERE_VISIBLE0xE33D59DA70B58FDF

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

SignatureJavaScript
isSphereVisible(x: number, y: number, z: number, radius: number): boolean
SignatureLua
isSphereVisible(x: number, y: number, z: number, radius: number): boolean

Usage

JavaScript
const result = isSphereVisible(x, y, z, radius);
Lua
local result = isSphereVisible(x, y, z, radius)

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
const result = isSphereVisible(pos, radius);
Lua · with vectors
local result = isSphereVisible(pos, radius)

Parameters

ParameterTypeJavaScriptLua
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Camera CAM
In the game
BOOL IS_SPHERE_VISIBLE(float x, float y, float z, float radius)
Hash
0xE33D59DA70B58FDF

Open in the interactive natives reference