createCollisionGroup(object)
Creates a new Collision Group and optionally applies it to the given object.
Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
object | Phaser.Group | Phaser.Sprite | <optional> | An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. |
- Source code: physics/p2/World.js (Line 1411)
Please login to continue.