SetBodyCollisionFilter
Category: 2D Game Physics (Pro)
Signature
SetBodyCollisionFilter(body As Integer, categoryFlags As Integer, maskFlags As Integer)
Returns
Void
Description
Sets the categories a body belongs to and the categories it accepts for collision.
Performance and behavior
A pair collides only when each mask shares a bit with the other category. New bodies use category 1 and mask -1. Filtered pairs produce no response or collision result.
Pro feature: requires GamePhysics.
Example
SetBodyCollisionFilter player, 1, 2 + 4