Physics.Arcade#angleBetween()

angleBetween(source, target, world) → {number} Find the angle in radians between two display objects (like Sprites). The optional world argument allows you to return the result based on the Game Objects world property,instead of its x and y values. This is useful of the object has been nested inside an offset Group,or parent Game Object. Parameters Name Type Argument Default Description source any The Display Object to test from. target any The Display Object to test to. world b

Physics.Arcade#accelerationFromRotation()

accelerationFromRotation(rotation, speed, point) → {Phaser.Point} Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object.One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object. Parameters Name Type Argument Default Description rotation number The angle in radians. speed number

Physics.Arcade#accelerateToXY()

accelerateToXY(displayObject, x, y, speed, xSpeedMax, ySpeedMax) → {number} Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)You must give a maximum speed value, beyond which the display object won't go any faster.Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.Note: The display object does

Physics.Arcade#accelerateToPointer()

accelerateToPointer(displayObject, pointer, speed, xSpeedMax, ySpeedMax) → {number} Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)You must give a maximum speed value, beyond which the display object won't go any faster.Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.Note: The display object doesn

Physics.Arcade#accelerateToObject()

accelerateToObject(displayObject, destination, speed, xSpeedMax, ySpeedMax) → {number} Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)You must give a maximum speed value, beyond which the display object won't go any faster.Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.Note: The display object do

Physics.ARCADE

[static] ARCADE : number Source code: physics/Physics.js (Line 73)

Physics#startSystem()

startSystem(system) This will create an instance of the requested physics simulation.Phaser.Physics.Arcade is running by default, but all others need activating directly. You can start the following physics systems: Phaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman.Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system.Phaser.Physics.BOX2D - A commercial Phaser Plugin (see http://phaser.io) Both Ninja Physics and Box2D require their respective plugins to

Physics#setWorldMaterial()

setWorldMaterial(material, left, right, top, bottom) Sets the given material against the 4 bounds of this World. Parameters Name Type Argument Default Description material Phaser.Physics.P2.Material The material to set. left boolean <optional> true If true will set the material on the left bounds wall. right boolean <optional> true If true will set the material on the right bounds wall. top boolean <optional> true If true will set the material on the to

Physics#setBoundsToWorld()

setBoundsToWorld(left, right, top, bottom, setCollisionGroup) Sets the bounds of the Physics world to match the Game.World dimensions.You can optionally set which 'walls' to create: left, right, top or bottom. Parameters Name Type Argument Default Description left boolean <optional> true If true will create the left bounds wall. right boolean <optional> true If true will create the right bounds wall. top boolean <optional> true If true will create the top bou

Physics#Physics

new Physics(game, physicsConfig) The Physics Manager is responsible for looking after all of the running physics systems.Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin. Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game. For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use t