From 15af7c6d0cfba77b0eb7a865864539cce3de9f57 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Mon, 4 Jun 2018 01:38:45 +0100 Subject: [PATCH] Added jsdocs --- src/physics/arcade/World.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 68d954b6e..8a64e60c3 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -1735,7 +1735,22 @@ var World = new Class({ }, /** - * Tests if Game Objects overlap and separates them (if possible). + * Performs a collision check and separation between the two physics enabled objects given, which can be single + * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups. + * + * If you don't require separation then use {@link #overlap} instead. + * + * If two Groups or arrays are passed, each member of one will be tested against each member of the other. + * + * If one Group **only** is passed (as `object1`), each member of the Group will be collided against the other members. + * + * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding + * objects are passed to it. + * + * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable + * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other. + * The separation that stops two objects penetrating may create a new penetration against a different object. If you + * require a high level of stability please consider using an alternative physics system, such as Matter.js. * * @method Phaser.Physics.Arcade.World#collide * @since 3.0.0