Physics.P2#nothingCollisionGroup

nothingCollisionGroup : Phaser.Physics.P2.CollisionGroup A default collision group. Source code: physics/p2/World.js (Line 217)

Physics.P2#mpxi()

mpxi(v) → {number} Convert p2 physics value (meters) to pixel scale 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 1807)

Physics.P2#mpx()

mpx(v) → {number} Convert p2 physics value (meters) to pixel scale.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 1777)

Physics.P2#hitTest()

hitTest(worldPoint, bodies, precision, filterStatic) → {Array} Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to(if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property. Parameters Name Type Argument Default Description worldPoint Phaser.Point Point to use for intersection tests. The points values must be in world (pixel) coordinates. bodies Array.<(Pha

Physics.P2#gravity

gravity : Phaser.Physics.P2.InversePointProxy The gravity applied to all bodies each step. Source code: physics/p2/World.js (Line 83)

Physics.P2#getSprings()

getSprings() → {array.<Phaser.Physics.P2.Spring>} Populates and returns an array of all current Springs in the world. Returns array.<Phaser.Physics.P2.Spring> - An array containing all current Springs in the world. Source code: physics/p2/World.js (Line 1315)

Physics.P2#getContactMaterial()

getContactMaterial(materialA, materialB) → {Phaser.Physics.P2.ContactMaterial | boolean} Gets a Contact Material based on the two given Materials. Parameters Name Type Description materialA Phaser.Physics.P2.Material The first Material to search for. materialB Phaser.Physics.P2.Material The second Material to search for. Returns Phaser.Physics.P2.ContactMaterial | boolean - The Contact Material or false if none was found matching the Materials given. Source code: physics/p2/World

Physics.P2#getConstraints()

getConstraints() → {array.<Phaser.Physics.P2.Constraint>} Populates and returns an array of all current Constraints in the world.You will get an array of p2 constraints back. This can be of mixed types, for example the array may containPrismaticConstraints, RevoluteConstraints or any other valid p2 constraint type. Returns array.<Phaser.Physics.P2.Constraint> - An array containing all current Constraints in the world. Source code: physics/p2/World.js (Line 1335)

Physics.P2#getBody()

getBody(object) → {p2.Body} Checks the given object to see if it has a p2.Body and if so returns it. Parameters Name Type Description object object The object to check for a p2.Body on. Returns p2.Body - The p2.Body, or null if not found. Source code: physics/p2/World.js (Line 1286)

Physics.P2#getBodies()

getBodies() → {array.<Phaser.Physics.P2.Body>} Populates and returns an array with references to of all current Bodies in the world. Returns array.<Phaser.Physics.P2.Body> - An array containing all current Bodies in the world. Source code: physics/p2/World.js (Line 1266)