Repository navigation
A3D_IsPointInWater
imshooter edited this page Oct 17, 2026
·
1 revision
Whether a point lies in the water of the map.
The point must be under the surface with nothing of the map between them, so the pool of an interior placed above the city does not flood the streets below it.
native bool:A3D_IsPointInWater(Float:x, Float:y, Float:z, &Float:depth = 0.0);| Parameter | Description | Default |
|---|---|---|
Float:x |
Point on the X axis. | |
Float:y |
Point on the Y axis. | |
Float:z |
Point on the Z axis. | |
&Float:depth |
How far under the surface the point lies. | 0.0 |
-
truewhen the point is in water. -
falsewhen it is not, or the database has no water.
depth is the height of the surface over the point. A player stands in water up to the waist when their position is about 0.0 deep, and is under water when it is over 1.0.
A call costs about 0.6 microseconds, a ray included.
Tells whether a player is diving.
stock bool:IsDiving(playerid) {
new
Float:x,
Float:y,
Float:z,
Float:depth
;
GetPlayerPos(playerid, x, y, z);
if (!A3D_IsPointInWater(x, y, z, depth)) {
return false;
}
return depth > 1.0;
}- A3D_GetWaterLevel: Find the height of the water at a point of the map.
- A3D_SetBuoyancy: Make a moving physics object float in the water of the map.
- A3D_RayCast: Find the first thing a segment between two points hits.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions