mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Corrected intersects fuction
Added protection against incorrect handling collisions. Clashes with the body itself will not be processed.
This commit is contained in:
parent
027725e702
commit
cd3742f9f2
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue