Corrected intersects fuction

Added protection against incorrect handling collisions. Clashes with the body itself will not be processed.
This commit is contained in:
Vitaliy 2016-05-31 01:18:17 +03:00
parent 027725e702
commit cd3742f9f2

View file

@ -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)
{