Physics · function

layersInteract

The 32-layer mask, both ways. A pair layersInteract only if each side admits the other.

Explained in Your first game, Rigid bodies.

function layersInteract(bodies: BodySet, a: number, b: number): boolean
import { layersInteract } from '@driftengine/physics';

Parameters

ParameterTypeDescription
bodiesBodySet
anumber
bnumber