How To

Create Compound Bodies


The Skull as a Compound Body

Skull The skull is an interesting shape to try to compound and you can see it in all its magnificence here -


It is roughly composed of a sphere for most of it with a box around the jaw area, with a bit of work involved to position the sphere and box as best as possible. The skull is compounded to these two covering meshes.

Compound Skull

Compound to Empty Mesh

  1. Create an empty mesh to be used as a parent for the compound body;
  2. Create a range of appropriately shaped standard meshes to fit over the irregular mesh;
  3. Parent the standard meshes and the irregular mesh to the empty mesh;
  4. Calculate or estimate the mass for each standard mesh;
  5. Create physics imposters for each standard mesh with zero mass;
  6. Create a physics imposter for the empty mesh, using the NoImposter property, with the total mass of all the standard meshes.

Note Step 3 MUST come before step 4.

Compound to One of the Covering Meshes

  1. Create a range of appropriately shaped standard meshes to fit over the irregular mesh;
  2. Choose one standard mesh and parent the other standard meshes and the irregular mesh to this mesh;
  3. Calculate or estimate the mass for each standard mesh;
  4. Create physics imposters for each standard mesh with the assumed mass;

Note Step 2 MUST come before step 4.

Further Reading

Basic - L1

How To Use The Physics' Engines
How To Use Forces
How To Use Joints
How To Use Pivots and Axes

Mid Level - L2

How To Use Advanced Features

More Advanced - L3

How To Add Your Own Physics Engine