Packs §24's separate 32-bit collisionGroups and collisionMask into the
single u32 Rapier calls InteractionGroups.
Rapier's rule, from its own documentation: two filters a and b interact
when ((a >> 16) & b) !== 0 && ((b >> 16) & a) !== 0 — the high 16 bits are
the membership groups and the low 16 the filter mask. That is the same
mutual rule passesQueryFilter documents in @fourjs/physics, so contact
filtering and query filtering agree by construction.
Values above bit 15 cannot be represented and are rejected;
ALL_COLLISION_GROUPS (0xffffffff) is the one exception, because "every
group" is still every group at 16 bits.
Packs §24's separate 32-bit
collisionGroupsandcollisionMaskinto the singleu32Rapier callsInteractionGroups.Rapier's rule, from its own documentation: two filters
aandbinteract when((a >> 16) & b) !== 0 && ((b >> 16) & a) !== 0— the high 16 bits are the membership groups and the low 16 the filter mask. That is the same mutual rulepassesQueryFilterdocuments in@fourjs/physics, so contact filtering and query filtering agree by construction.Values above bit 15 cannot be represented and are rejected;
ALL_COLLISION_GROUPS(0xffffffff) is the one exception, because "every group" is still every group at 16 bits.