setCollisionGroup(group, shape)
Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified.
This also resets the collisionMask.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
group | Phaser.Physics.CollisionGroup | The Collision Group that this Bodies shapes will use. | |
shape | p2.Shape | <optional> | An optional Shape. If not provided the collision group will be added to all Shapes in this Body. |
- Source code: physics/p2/Body.js (Line 295)
Please login to continue.