Phaser API Documentation

  Version: 
setCollisionGroup(value)

Description:

Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see #setCollisionCategory and #setCollisionGroup). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide.

Parameters:

name type description
value number

Unique group index.

Returns:
Description:

This Game Object.