Jump to content

how to destroy onBeginContact sprite body


Bala20kumar
 Share

Recommended Posts

if (bodyA === null) { return; }
                
            if(equation[0].bodyA.parent.sprite.key!=='hit')
                {
                    equation[0].bodyA.parent.sprite.key.body.destroy();
                
                }
            if(equation[0].bodyB.parent.sprite.key!=='hit')
                {
                      equation[0].bodyB.parent.sprite.key.body.destroy();
                }

anyone help to destroy the body...   i got error on destroy line or  here how can set safeDestroy as true 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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