Skip to content

Commit 15af7c6

Browse files
committed
Added jsdocs
1 parent 996ba89 commit 15af7c6

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

src/physics/arcade/World.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,22 @@ var World = new Class({
17351735
},
17361736

17371737
/**
1738-
* Tests if Game Objects overlap and separates them (if possible).
1738+
* Performs a collision check and separation between the two physics enabled objects given, which can be single
1739+
* Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.
1740+
*
1741+
* If you don't require separation then use {@link #overlap} instead.
1742+
*
1743+
* If two Groups or arrays are passed, each member of one will be tested against each member of the other.
1744+
*
1745+
* If one Group **only** is passed (as `object1`), each member of the Group will be collided against the other members.
1746+
*
1747+
* Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding
1748+
* objects are passed to it.
1749+
*
1750+
* Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable
1751+
* for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.
1752+
* The separation that stops two objects penetrating may create a new penetration against a different object. If you
1753+
* require a high level of stability please consider using an alternative physics system, such as Matter.js.
17391754
*
17401755
* @method Phaser.Physics.Arcade.World#collide
17411756
* @since 3.0.0

0 commit comments

Comments
 (0)