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[]): number
import { describeContacts } from '@driftengine/core';

Parameters

ParameterTypeDescription
collidersColliderSet
boxAabb
radiusnumber
scratchInt32Array
outContactReport[]

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.