Physics.P2#enableBody()

enableBody(object, debug)

Creates a P2 Physics body on the given game object.
A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

Parameters
Name Type Description
object object

The game object to create the physics body on. A body will only be created if this object has a null body property.

debug boolean

Create a debug object to go with this body?

Source code: physics/p2/World.js (Line 372)
doc_phaser
2017-02-14 11:01:05
Comments
Leave a Comment

Please login to continue.