Jump to content

P2 physics and body collision callback with world bounds


MoreK
 Share

Recommended Posts

Is there a way to set a callback when sprite is colliding with world bounds, when using P2 physics? I need to trigger a sound effect when a ball drops down and hits the world bottom.

 

sprite.body.createBodyCallback does the trick with other sprites, but I couldn't find anything about world bounds. I can create an extra block below the world bound, that would do the trick, but I thought there may be a more sophisticated way to implement this.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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