Skip to content

@modoki/engine / index / setPhysicsLayers

Function: setPhysicsLayers()

setPhysicsLayers(config?): void

Install the project's layers + matrix. Names beyond 16 are dropped (16-bit limit). Empty/omitted (or all-blank) → reset to the collide-with-all 'Default'.

NOTE: entries are kept BY INDEX (a blank name is preserved as an unselectable slot, not filtered out) so a layer's index — and therefore its matrix bit-column — stays stable. Filtering blanks out of the middle would shift every later layer's bit and silently corrupt the matrix.

Parameters

config?

PhysicsLayersConfig | null

Returns

void

Built with Modoki.