From b48669dded6bde391d9d9038fcd3c4017ecae746 Mon Sep 17 00:00:00 2001 From: Cameron Foale Date: Thu, 5 Dec 2013 16:26:03 +1100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20test=20self-collisions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/physics/arcade/ArcadePhysics.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/physics/arcade/ArcadePhysics.js b/src/physics/arcade/ArcadePhysics.js index 570b3b2e..c2178305 100644 --- a/src/physics/arcade/ArcadePhysics.js +++ b/src/physics/arcade/ArcadePhysics.js @@ -750,9 +750,12 @@ Phaser.Physics.Arcade.prototype = { * @returns {boolean} Returns true if the bodies were separated, otherwise false. */ separate: function (body1, body2) { - - this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); - + if(body1 !== body2) + { + this._result = (this.separateX(body1, body2) || this.separateY(body1, body2)); + } else { + this._result = false; + } }, /**