Skip to content

encodeCollisionGroups

encodeCollisionGroups(layer, collides): number

Defined in: packages/engine/src/gameplay/physics/traits.ts:30

Rapier’s interaction groups for a collider standing in layer that tests against collides: the membership in the high 16 bits and the filter in the low 16, as the collider and the walk’s casts both read them.

Parameter Type
layer CollisionLayer
collides readonly CollisionLayer[]

number