Skip to content

isAmbientPedSphereVisible

Client-side

Runs GTA's camera-frustum sphere test without creating an entity.

Syntax

bool isAmbientPedSphereVisible(Vector3 position, float radius)

Arguments

positionVector3

Sphere center.

radiusfloat

Sphere radius.

Returns

true when the sphere is visible to the current GTA camera; false otherwise.

Ownership and lifecycle

Candidate queries create nothing. A multiplayer resource must validate each proposal, create and own the real NPCs and vehicles, assign one current syncer, handle ownership changes, and clean up every element. Native AI and event tokens belong to the calling resource and are revoked when that resource stops.

Important behavior
  • The reference population resource uses this as one input to a multi-client spawn veto.

Where this comes from

RELATED SA:O APIS

Continue exploring

Read the system guide →