scofieldly Posted November 1, 2016 Share Posted November 1, 2016 hi guys, I wonder is there any way to check whether 2 sprite in different groups are overlap, in the p2 system, currently I am using game.physics.p2.setPostBroadphaseCallback(this.checkOverlap, this); to do it, however I think it maybe expensive because I need to check whether the 2 sprites are from same group (the same group should not do anything). and I do not need collide when 2 sprite impact, I just need them to trigger my function. so I wonder is there any way to do thing like body.collide in arcade system, thanks. Link to comment Share on other sites More sharing options...
scofieldly Posted November 1, 2016 Author Share Posted November 1, 2016 actually I have 2 groups, bullet and ememy, when the bullet hit ememy, I just want to make damageEffect but not collide, and the bullet will rotate when collide the bound with angle, that's why I choose p2 not arcade. Link to comment Share on other sites More sharing options...
Recommended Posts