TomFiveThumbs Posted April 3, 2014 Share Posted April 3, 2014 Can you check for collisions within a group? I have a group of platforms, a group of boxes, and a player The player collides with the platforms fineThe player collides with the boxes fineThe platforms collide with the boxes fine But, I'd like the boxes to collide with each other. Is this possible? Tilde 1 Link to comment Share on other sites More sharing options...
Zenryo Posted April 3, 2014 Share Posted April 3, 2014 Yes, it is possible! Just add this to your update function:game.physics.arcade.collide(group);In action: http://examples.phaser.io/_site/view_full.html?d=arcade%20physics&f=group+vs+self.js&t=group%20vs%20self Tilde and Zaidar 2 Link to comment Share on other sites More sharing options...
TomFiveThumbs Posted April 3, 2014 Author Share Posted April 3, 2014 Yes, it is possible! Just add this to your update function:game.physics.arcade.collide(group);In action: http://examples.phaser.io/_site/view_full.html?d=arcade%20physics&f=group+vs+self.js&t=group%20vs%20self Dang it! I was trying game.physics.arcade.collide(group, group); So close! thanks Zenryo Zenryo and Tilde 2 Link to comment Share on other sites More sharing options...
Zaidar Posted April 4, 2014 Share Posted April 4, 2014 Wouah ! Exactly what I was looking for thx ! Link to comment Share on other sites More sharing options...
NEWBIE21 Posted December 10, 2015 Share Posted December 10, 2015 Hey guys, what if you wanted to do this: detect collision within a group, using P2 physics, is that possible? Link to comment Share on other sites More sharing options...
Recommended Posts