Physics.Arcade#distanceBetween()

distanceBetween(source, target, world) → {number} Find the distance 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 boolea

Physics.Arcade#computeVelocity()

computeVelocity(axis, body, velocity, acceleration, drag, max) → {number} A tween-like function that takes a starting velocity and some other factors and returns an altered velocity.Based on a function in Flixel by @ADAMATOMIC Parameters Name Type Argument Default Description axis number 0 for nothing, 1 for horizontal, 2 for vertical. body Phaser.Physics.Arcade.Body The Body object to be updated. velocity number Any component of velocity (e.g. 20). acceleration number

Physics.Arcade#collide()

collide(object1, object2, collideCallback, processCallback, callbackContext) → {boolean} Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.Both the first and second parameter can be arrays of objects, of differing types.If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.The objects are also automat

Physics.Arcade#circleBodyIntersects()

circleBodyIntersects(circle, body) → {boolean} Checks to see if a circular Body intersects with a Rectangular Body. Parameters Name Type Description circle Phaser.Physics.Arcade.Body The Body with isCircle set. body Phaser.Physics.Arcade.Body The Body with isCircle not set (i.e. uses Rectangle shape) Returns boolean - Returns true if the bodies intersect, otherwise false. Source code: physics/arcade/World.js (Line 1125)

Physics.Arcade#checkCollision

checkCollision : Object Set the checkCollision properties to control for which bounds collision is processed.For example checkCollision.down = false means Bodies cannot collide with the World.bounds.bottom. An object containing allowed collision flags. Source code: physics/arcade/World.js (Line 36)

Physics.Arcade#bounds

bounds : Phaser.Rectangle The bounds inside of which the physics world exists. Defaults to match the world bounds. Source code: physics/arcade/World.js (Line 29)

Physics.Arcade#Arcade

new Arcade(game) The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods. Parameters Name Type Description game Phaser.Game reference to the current game instance. Source code: physics/arcade/World.js (Line 14)

Physics.Arcade#angleToXY()

angleToXY(displayObject, x, y, world) → {number} Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate. 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 displayObject any The Display Object to test from. x number The x

Physics.Arcade#angleToPointer()

angleToPointer(displayObject, pointer, world) → {number} Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account. 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 displayObject any The Display Object

Physics.Arcade#angleBetweenCenters()

angleBetweenCenters(source, target) → {number} Find the angle in radians between centers of two display objects (like Sprites). Parameters Name Type Description source any The Display Object to test from. target any The Display Object to test to. Returns number - The angle in radians between the source and target display objects. Source code: physics/arcade/World.js (Line 2024)