Skip to content

Collision Flags

imshooter edited this page Oct 17, 2026 · 1 revision

The flags of A3D_COLLIDE pick the kinds of body a query sees and a moving object collides with.

Flag Value Bodies
A3D_COLLIDE_MAP 1 The map objects of the game
A3D_COLLIDE_OBJECTS 2 Moving physics objects
A3D_COLLIDE_STATIC 4 Static objects
A3D_COLLIDE_PLAYERS 8 Players on foot
A3D_COLLIDE_VEHICLES 16 Vehicles
A3D_COLLIDE_WATER 32 The surface of the water, for queries only
A3D_COLLIDE_ACTORS 64 Actors
A3D_COLLIDE_ALL 95 Every kind of body, without the water

Combine flags with | and take one out of a set with & ~:

new A3D_COLLIDE:sight = A3D_COLLIDE_MAP | A3D_COLLIDE_STATIC | A3D_COLLIDE_VEHICLES;
new A3D_COLLIDE:noPlayers = A3D_COLLIDE_ALL & ~A3D_COLLIDE_PLAYERS;
new A3D_COLLIDE:wet = A3D_COLLIDE_ALL | A3D_COLLIDE_WATER;

In queries

Every query that takes flags sees only the bodies they name. Rays, sweeps and overlaps default to A3D_COLLIDE_ALL. A3D_IsLineOfSight and A3D_FindGround default to A3D_COLLIDE_MAP | A3D_COLLIDE_STATIC. With A3D_COLLIDE_WATER, rays, sweeps and lines of sight stop at the water. See World queries.

On moving objects

A3D_SetCollisions picks what a moving object collides with, A3D_COLLIDE_ALL by default. The water flag has no effect there, since objects float with A3D_SetBuoyancy instead. Two moving objects collide only when both hold A3D_COLLIDE_OBJECTS.

Home

Guides

Reference

Functions

Creating objects
Motion
Placement
Behaviour
Display and data
Rays
Shapes
Players, vehicles and actors
Map probes
Screen
Map objects
Water
Models and surfaces
Rotations and offsets
Vehicles
Routes
Route display
Walking
Callbacks

Clone this wiki locally