I have a group that has groups inside of it. This might be bad design and I'm willing to take a look at a different way of doing it. var MyGroup = function(game, parent) { Phaser.Group.call(this, game, parent); this.add(spriteWithPhysicsBody); this.add(anotherSpriteWithPhysicsBody);}; MyGroup.prototype = Object.create(Phaser.Sprite);MyGroup.prototype.constructor = MyGroup; in my play state: create: function() { this.player = game.add.sprite(0,0, 'player'); this.groups = game.add.group(); this.groups.add(new MyGroup(this.game, this.group);},update: function() { this.game.physics.arcade.collide(this.player, this.groups, this.collisionHandler, null, this);}This doesn't work. Nothing ever collides. But if I do this: this.groups.forEachExists(function(group) { this.game.collide(this.player, group, this.collisionHandler, null, this);}, this);Everything works. Am I making it too complicated, or is this the only way to do it?

I don't know how fast it is, but game.physics.arcade.distanceToObject will return the distance in pixels between two game objects. Looping through on screen enemies in a group and then running that calculation wouldn't be too bad.

I may reach out to him, but we're using a different technology stack and have different workflows. For example: I'm using Grunt and Browserify. He's using Gulp. I've set up my workflow for dependency injection and inheritance. His is just... very flat. I've added subgenerators for states and prefabs, he's got nothing like that. I will send a message to him and see if he's interested in collaborating, though.