Instrumentation · function
describeContacts
Describe every collider overlapping box or within radius of it.
Explained in In-game tools.
function describeContacts(colliders: ColliderSet, box: Aabb, radius: number, scratch: Int32Array, out: ContactReport[]): numberimport { describeContacts } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
colliders | ColliderSet | |
box | Aabb | |
radius | number | |
scratch | Int32Array | |
out | ContactReport[] |
In depth
Returns how many entries of out were written. Reports are in query order, which is
spatial-hash order and therefore arbitrary: sort by distanceM at the point of
display if order matters, rather than paying for it here.