Physics.P2#createCollisionGroup()

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)
doc_phaser
2017-02-14 11:00:56
Comments
Leave a Comment

Please login to continue.