Physics.P2#sleepMode

sleepMode : number How to deactivate bodies during simulation. Possible modes are: World.NO_SLEEPING, World.BODY_SLEEPING and World.ISLAND_SLEEPING.If sleeping is enabled, you might need to wake up the bodies if they fall asleep when they shouldn't. If you want to enable sleeping in the world, but want to disable it for a particular body, see Body.allowSleep. Source code: physics/p2/World.js (Line 2014)

Physics.P2#setPostBroadphaseCallback()

setPostBroadphaseCallback(callback, context) Sets a callback to be fired after the Broadphase has collected collision pairs in the world.Just because a pair exists it doesn't mean they will collide, just that they potentially could do.If your calback returns false the pair will be removed from the narrowphase. This will stop them testing for collision this step.Returning true from the callback will ensure they are checked in the narrowphase. Parameters Name Type Description callback functio

Physics.P2#setMaterial()

setMaterial(material, bodies) Sets the given Material against all Shapes owned by all the Bodies in the given array. Parameters Name Type Description material Phaser.Physics.P2.Material The Material to be applied to the given Bodies. bodies array.<Phaser.Physics.P2.Body> An Array of Body objects that the given Material will be set on. Source code: physics/p2/World.js (Line 1201)

Physics.P2#setImpactEvents()

setImpactEvents(state) Impact event handling is disabled by default. Enable it before any impact events will be dispatched.In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks. Parameters Name Type Description state boolean Set to true to enable impact events, or false to disable. Source code: physics/p2/World.js (Line 393)

Physics.P2#setBounds()

setBounds(x, y, width, height, left, right, top, bottom, setCollisionGroup) Sets the bounds of the Physics world to match the given world pixel dimensions.You can optionally set which 'walls' to create: left, right, top or bottom.If none of the walls are given it will default to use the walls settings it had previously.I.e. if you previously told it to not have the left or right walls, and you then adjust the world sizethe newly created bounds will also not have the left and right walls.Expli

Physics.P2#resume()

resume() Resumes a paused P2 World. Source code: physics/p2/World.js (Line 744)

Physics.P2#restitution

restitution : number Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair. Source code: physics/p2/World.js (Line 1859)

Physics.P2#reset()

reset() Called by Phaser.Physics when a State swap occurs.Starts the begin and end Contact listeners again. Source code: physics/p2/World.js (Line 779)

Physics.P2#removeSpring()

removeSpring(spring) → {Phaser.Physics.P2.Spring} Removes a Spring from the world. Parameters Name Type Description spring Phaser.Physics.P2.Spring The Spring to remove from the World. Returns Phaser.Physics.P2.Spring - The Spring that was removed. Source code: physics/p2/World.js (Line 955)

Physics.P2#removeContactMaterial()

removeContactMaterial(material) → {Phaser.Physics.P2.ContactMaterial} Removes a Contact Material from the world. Parameters Name Type Description material Phaser.Physics.P2.ContactMaterial The Contact Material to be removed from the World. Returns Phaser.Physics.P2.ContactMaterial - The Contact Material that was removed. Source code: physics/p2/World.js (Line 1170)