liabru/matter-js — pull request #42 by GustavCarlson (2014-07-22 13:12:19+00:00)
Title: More fine-grained collision filtering in the style of Box2D

Currently, making overlapping bodies not interact can only be achieved by setting their `groupId` properties equal, as seen in some of the demos. For real applications (e.g. games) this likely does not provide enough granularity in many cases.

This PR extends the concept of `Body.groupId` to collision categories with bitmask filtering, introducing the property `Body.collisionFilter` of type `Object`. Demo (dev build) and docs are included.