A shape configuration is used for construction of shapes. An instance of this class can safely be reused as a shape will not have any references of a field of this class.
Constructor
Variables
collisionGroup:Int
The collision group bits the shape belongs to. This is used for collision filtering.
Two shapes shape1
and shape2
will collide only if both
shape1.collisionGroup & shape2.collisionMask
and
shape2.collisionGroup & shape1.collisionMask
are not zero.
collisionMask:Int
The collision mask bits of the shape. This is used for collision filtering.
Two shapes shape1
and shape2
will collide only if both
shape1.collisionGroup & shape2.collisionMask
and
shape2.collisionGroup & shape1.collisionMask
are not zero.
contactCallback:ContactCallback
The contact callback of the shape. The callback methods are called when contact events the shape is involved occurred.