Jump to content

P2 removeAll does not remove polygon (?)


wernersbacher
 Share

Recommended Posts

Hello, I'm using the P2 engine. There are some enemies (sprites), which have a defined polygon body. I'm using collison groups to detect collisions, which always should result in gameovers. When the player died, the sprites should get removed. I try to do that with sharks.removeAll(); and it does remove the sprites, but in debug mode I can still see the polygons, which results in instant gameover (not every time)

 

6PNvY.png

 

So can anybody help me? Do i need a speciale method to remove them?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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