Jump to content

P2 Collisions and Callbacks


Recommended Posts

I have a simple space ship shooter game and I have a question about collisions and grouping them.

I'm familiar with the collisions groups, impact events and postbroadphase callback P2 examples.

Setting collision groups to have ships bounce off walls and each other is like the examples. When I add bullets to a group they bounce around too; off walls and push ships around. The result of the impact happens before the bullet sprite is killed.

Bullets act as expected using a postbroadphase callback, but that callback fires anytime anything collides with anything. Is this the correct way to handle this? Is there a way to stop impact events using collision groups?

I've googled the hell out of this, but maybe some keyword to point me in the right direction eludes me. Thanks for any help.






Link to comment
Share on other sites


  • Recently Browsing   0 members

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