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 |
debug | boolean | Create a debug object to go with this body? |
- Source code: physics/p2/World.js (Line 372)
Please login to continue.