Summary

Now you know how to select and destroy a body, as well as get body information. With these concepts you can build a complete, though not that advanced, Totem Destroyer prototype.

Although you aren't able to determine if the idol touched the ground (failing the level), you can check for its angle to be between -30 and +30 to show that the idol did not fall down, and create your first Totem Destroyer game.

Get Box2D for Flash Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.