Skip to content

Commit 75e2f76

Browse files
committed
Update Collision.js
1 parent 76c81e1 commit 75e2f76

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/physics/matter-js/components/Collision.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
var Collision = {
1414

1515
/**
16-
* Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}).
16+
* Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31.
17+
* Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision
18+
* categories are included in their collision masks (see {@link #setCollidesWith}).
1719
*
1820
* @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory
1921
* @since 3.0.0
@@ -30,7 +32,10 @@ var Collision = {
3032
},
3133

3234
/**
33-
* Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide.
35+
* Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values,
36+
* they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}).
37+
* If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value,
38+
* they will never collide.
3439
*
3540
* @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup
3641
* @since 3.0.0
@@ -47,7 +52,9 @@ var Collision = {
4752
},
4853

4954
/**
50-
* Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true.
55+
* Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only
56+
* collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0`
57+
* and `(categoryB & maskA) !== 0` are both true.
5158
*
5259
* @method Phaser.Physics.Matter.Components.Collision#setCollidesWith
5360
* @since 3.0.0

0 commit comments

Comments
 (0)