Creating compound bodies

The idol is the main character in Totem Destroyer, we can't represent it with just a box, or the curse of the totem will persecute us forever.

I was thinking about something like the following figure:

Creating compound bodies

This is what I call an idol, and this is what we are going to build with Box2D.

On the left-hand side, the outline of the bodies forming the idol, and on the right-hand side the finished idol silhouette.

The first thing you can see is that the idol is made by more than one body joined together to create a single, complex body. Remember Box2D only works with convex polygons. Unlike totem bricks, which are just single boxes stacked, ...

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.