Skip to content

Commit b48669d

Browse files
committed
Don’t test self-collisions
1 parent 666df67 commit b48669d

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/physics/arcade/ArcadePhysics.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,9 +750,12 @@ Phaser.Physics.Arcade.prototype = {
750750
* @returns {boolean} Returns true if the bodies were separated, otherwise false.
751751
*/
752752
separate: function (body1, body2) {
753-
754-
this._result = (this.separateX(body1, body2) || this.separateY(body1, body2));
755-
753+
if(body1 !== body2)
754+
{
755+
this._result = (this.separateX(body1, body2) || this.separateY(body1, body2));
756+
} else {
757+
this._result = false;
758+
}
756759
},
757760

758761
/**

0 commit comments

Comments
 (0)