Repository navigation
A3D_OverlapBox
imshooter edited this page Oct 17, 2026
·
1 revision
Find everything a box overlaps, such as the room a vehicle or an object needs.
native A3D_OverlapBox(
Float:sizeX,
Float:sizeY,
Float:sizeZ,
Float:x,
Float:y,
Float:z,
Float:rx,
Float:ry,
Float:rz,
A3D_HIT:types[],
hitids[],
size = sizeof (hitids),
worldid = -1,
A3D_COLLIDE:flags = A3D_COLLIDE_ALL
);| Parameter | Description | Default |
|---|---|---|
Float:sizeX |
Size on the X axis. | |
Float:sizeY |
Size on the Y axis. | |
Float:sizeZ |
Size on the Z axis. | |
Float:x |
Centre on the X axis. | |
Float:y |
Centre on the Y axis. | |
Float:z |
Centre on the Z axis. | |
Float:rx |
Rotation on the X axis. | |
Float:ry |
Rotation on the Y axis. | |
Float:rz |
Rotation on the Z axis. | |
A3D_HIT:types[] |
What each thing found is. | |
hitids[] |
What each thing found is, as the hitid of A3D_RayCast. |
|
size |
Room in each array. | sizeof (hitids) |
worldid |
Virtual world to look in, or -1 for every world. |
-1 |
A3D_COLLIDE:flags |
What may be found. | A3D_COLLIDE_ALL |
- The number of things written.
The box is centred on the position and turned by the rotation, like an object. A box that rests on the ground overlaps it, so lift it a few centimetres or leave A3D_COLLIDE_MAP out of the flags when the ground does not matter. Everything else follows A3D_OverlapSphere.
Tells whether a parking space is free before a vehicle is created on it.
stock bool:IsSpaceFree(modelid, Float:x, Float:y, Float:z, Float:angle) {
new
Float:sizeX,
Float:sizeY,
Float:sizeZ,
A3D_HIT:types[1],
hitids[1]
;
GetVehicleModelInfo(modelid, VEHICLE_MODEL_INFO_SIZE, sizeX, sizeY, sizeZ);
return A3D_OverlapBox(sizeX, sizeY, sizeZ, x, y, z + 0.1, 0.0, 0.0, angle, types, hitids, .flags = A3D_COLLIDE_ALL & ~A3D_COLLIDE_MAP) == 0;
}- A3D_OverlapSphere: Find everything a sphere overlaps.
- A3D_OverlapModel: Find everything a model would overlap at a position, such as before placing an object.
- A3D_IsModelColliding: Whether a model would touch anything at a position.
3DAndreas 0.6.3 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions