Make objects inside a group collide with themselves in Phaser.io?

大兔子大兔子 提交于 2019-12-06 13:03:16

You can collide a Group with itself:

game.physics.arcade.collide(this.board, this.board);

Although on that note I would point you at this tutorial on adding a simple 1d sort array, which will help considerably if the Group is densely populated: http://ra3s.com/wordpress/dysfunctional-programming/pruning-collision-detection-with-a-1d-sort/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!