Physics.P2.Body#setZeroForce()

setZeroForce() Sets the force on the body to zero. Source code: physics/p2/Body.js (Line 578)

Physics.P2.Body#setZeroDamping()

setZeroDamping() Sets the Body damping and angularDamping to zero. Source code: physics/p2/Body.js (Line 612)

Physics.P2.Body#setRectangleFromSprite()

setRectangleFromSprite(sprite) → {p2.Rectangle} Clears any previously set shapes.Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given.If no Sprite is given it defaults to using the parent of this Body.If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates. Parameters Name Type Argument Description sprite Phaser.Sprite | Phaser.Image <optional> The Sprite on which the Rectangle will get

Physics.P2.Body#setRectangle()

setRectangle(width, height, offsetX, offsetY, rotation) → {p2.Rectangle} Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body.If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite.If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates. Parameters Name Type Argument Default Description width number <optional> 1

Physics.P2.Body#setMaterial()

setMaterial(material, shape) Adds the given Material to all Shapes that belong to this Body.If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter. Parameters Name Type Argument Description material Phaser.Physics.P2.Material The Material that will be applied. shape p2.Shape <optional> An optional Shape. If not provided the Material will be added to all Shapes in this Body. Source code: physics/p2/Body.js (Line 1272)

Physics.P2.Body#setCollisionGroup()

setCollisionGroup(group, shape) Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified.This also resets the collisionMask. Parameters Name Type Argument Description group Phaser.Physics.CollisionGroup The Collision Group that this Bodies shapes will use. shape p2.Shape <optional> An optional Shape. If not provided the collision group will be added to all Shapes in this Body. Source code: physics/p2/Body.js (Line 295)

Physics.P2.Body#setCircle()

setCircle(radius, offsetX, offsetY, rotation) Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body.If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates. Parameters Name Type Argument Default Description radius number The radius of this circle (in pixels) offsetX number <optional> 0 Local horizontal offset of the shape relative to the body center of mass. offsetY number <option

Physics.P2.Body#rotation

rotation : number The angle of the Body in radians.If you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in radians. Source code: physics/p2/Body.js (Line 1822)

Physics.P2.Body#rotateRight()

rotateRight(speed) This will rotate the Body by the given speed to the left (clockwise). Parameters Name Type Description speed number The speed at which it should rotate. Source code: physics/p2/Body.js (Line 662)

Physics.P2.Body#rotateLeft()

rotateLeft(speed) This will rotate the Body by the given speed to the left (counter-clockwise). Parameters Name Type Description speed number The speed at which it should rotate. Source code: physics/p2/Body.js (Line 650)