Asynchronous body destruction
So far, we have learned how to create bodies, how to reposition them, and how to apply forces and impulses to move them around onscreen.
In this example, we will see how to destroy a body during the physics simulation. This is naturally a very tricky process that can create bugs and cause game crashes if you’re not careful.