IS_SPHERE_VISIBLE
Returns true if a sphere of radius centered on (x, y, z) is inside the rendered camera's view.
Signature
BOOL IS_SPHERE_VISIBLE(float x, float y, float z, float radius); // 0x2E941B5FFA2989C6 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | x | float |
| 2 | y | float |
| 3 | z | float |
| 4 | radius | float |
Facts
| Name | IS_SPHERE_VISIBLE |
|---|---|
| Hash | 0x2E941B5FFA2989C6 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0x2E941B5FFA2989C6, -- IS_SPHERE_VISIBLE
0.0, -- float x
0.0, -- float y
0.0, -- float z
0.0 -- float radius
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x2E941B5FFA2989C6", // IS_SPHERE_VISIBLE
0.0, // float x
0.0, // float y
0.0, // float z
0.0, // float radius
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x2E941B5FFA2989C6, // IS_SPHERE_VISIBLE
0.0f, // float x
0.0f, // float y
0.0f, // float z
0.0f // float radius
);Related CAMERA natives
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.