Jump to content

is there any way to check overlap between 2 groups in p2 system


Recommended Posts

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


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...