Physics.P2#removeConstraint()

removeConstraint(constraint) → {Phaser.Physics.P2.Constraint} Removes a Constraint from the world. Parameters Name Type Description constraint Phaser.Physics.P2.Constraint The Constraint to be removed from the World. Returns Phaser.Physics.P2.Constraint - The Constraint that was removed. Source code: physics/p2/World.js (Line 1136)

Physics.P2#removeBodyNextStep()

removeBodyNextStep(body) This will add a P2 Physics body into the removal list for the next step. Parameters Name Type Description body Phaser.Physics.P2.Body The body to remove at the start of the next step. Source code: physics/p2/World.js (Line 283)

Physics.P2#removeBody()

removeBody(body) → {Phaser.Physics.P2.Body} Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with. Parameters Name Type Description body Phaser.Physics.P2.Body The Body to remove from the World. Returns Phaser.Physics.P2.Body - The Body that was removed. Source code: physics/p2/World.js (Line 911)

Physics.P2#pxmi()

pxmi(v) → {number} Convert pixel value to p2 physics scale (meters) and inverses it.By default Phaser uses a scale of 20px per meter.If you need to modify this you can over-ride these functions via the Physics Configuration object. Parameters Name Type Description v number The value to convert. Returns number - The scaled value. Source code: physics/p2/World.js (Line 1822)

Physics.P2#pxm()

pxm(v) → {number} Convert pixel value to p2 physics scale (meters).By default Phaser uses a scale of 20px per meter.If you need to modify this you can over-ride these functions via the Physics Configuration object. Parameters Name Type Description v number The value to convert. Returns number - The scaled value. Source code: physics/p2/World.js (Line 1792)

Physics.P2#preUpdate()

preUpdate() Called at the start of the core update loop. Purges flagged bodies from the world. Source code: physics/p2/World.js (Line 295)

Physics.P2#postBroadphaseCallback

postBroadphaseCallback : Function A postBroadphase callback. Source code: physics/p2/World.js (Line 165)

Physics.P2#paused

paused : boolean The paused state of the P2 World. Source code: physics/p2/World.js (Line 72)

Physics.P2#pause()

pause() Pauses the P2 World independent of the game pause state. Source code: physics/p2/World.js (Line 733)

Physics.P2#P2

new P2(game, config) This is your main access to the P2 Physics World.From here you can create materials, listen for events and add bodies into the physics simulation. Parameters Name Type Argument Description game Phaser.Game Reference to the current game instance. config object <optional> Physics configuration object passed in from the game constructor. Source code: physics/p2/World.js (Line 20)