From cd3742f9f243650a5ce2f81226fc4d1cc386a8b2 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 31 May 2016 01:18:17 +0300 Subject: [PATCH] Corrected intersects fuction Added protection against incorrect handling collisions. Clashes with the body itself will not be processed. --- src/physics/arcade/World.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index ad8efa516..e526fa3c1 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -986,6 +986,8 @@ Phaser.Physics.Arcade.prototype = { */ intersects: function (body1, body2) { + if (body1 === body2) return false; + // Rect vs. Rect if (body1.right <= body2.position.x) {