Disable collision between a group of fixtures.

Topics: User Forum
Jan 11, 2011 at 5:55 AM

I've played around with collisionGroup members, etc.. but I can't get this working.

Fixture A is created before Fixture B (If B is even created), however if it is, A cannot collide with B (and vise-versa) but still collied with other world entities. This is an example consisting of two fixtures however I will have a variable amount of fixtures which cannot collide with one-another.



Jan 11, 2011 at 9:51 AM

Just set 

Fixture.CollisionFilter.CollisionGroup = -1;

on your Fixtures. Fixtures with the same (negative) group index will never collide with each other but still collide with everything else (depending on the CollisionFilter settings of other objects of course).