Class Box2DCollisionMatrix
Which collision groups collide with which: a symmetric table over positive group numbers, where every pair collides until SetCollision(int, int, bool) says otherwise. CollisionMatrix is the one the simulation consults, for the shapes that joined a group through InCollisionGroup(B2ShapeDef, int).
public sealed class Box2DCollisionMatrix
- Inheritance
-
Box2DCollisionMatrix
Methods
CanCollide(int, int)
Returns whether two groups may collide; true for any pair never configured.
public bool CanCollide(int groupA, int groupB)
Parameters
Returns
SetCollision(int, int, bool)
Sets whether two groups may collide. Order does not matter.
public void SetCollision(int groupA, int groupB, bool canCollide)