Added missing check

This commit is contained in:
Richard Davey 2018-06-08 00:22:58 +01:00
parent 5f1fff6d48
commit 1777c47a23

View file

@ -2002,9 +2002,9 @@ var World = new Class({
{
bodyB = results[i];
if (bodyA === bodyB)
if (bodyA === bodyB || !group.contains(bodyB.gameObject))
{
// Skip if comparing against itself
// Skip if comparing against itself, or if bodyB isn't actually part of the Group
continue;
}