The base class for every collision shape.
A ColShape is pure geometry: it knows its own bounds and can answer
"is this point inside me?". It does no polling, registers no events, and
is entirely environment-agnostic, which is what lets the same shape
definition be shared between client and server code.
The polling layer that turns shapes into enter/exit callbacks lives in
fivem.client.core.Zones (against the local player) and
fivem.server.core.Zones (against every connected player).
Subclasses must implement contains, distanceTo and boundingRadius.
boundingRadius exists so the zone managers can reject far-away shapes
with a single cheap distance check before running the real containment
test — the difference between a viable per-frame poll and a stutter.
Variables
read onlyid:String
An identifier for this shape, useful for keying zone state. Assigned automatically if not given.
Methods
boundingRadius():Float
The radius of a sphere centred on center that fully encloses the
shape. Used as a cheap rejection test before contains.
inlinemightContain(point:Vector3):Bool
A cheap conservative test: false means point is definitely outside,
true means contains is worth calling.