Game Development Reference
M ASS -A GGREGATE
P HYSICS E NGINE
ulation and constructions made of many objects connected by rods, cables,
and springs. It is time to test the engine on some example scenarios.
The engine still has limits, however; in particular, it can't describe the way objects
rotate. We'll look at ways around this, faking the rotation of objects in terms of mass
aggregates. It is a useful technique for some applications and can eliminate the need
for more advanced physics.
We've now built a mass-aggregate physics engine, capable of both particle sim-
O VERVIEW OF THE E NGINE
The mass-aggregate physics engine has three components:
1. The particles themselves keep track of their position, movement, and mass. To
set up a simulation we need to work out what particles are needed and set their
initial position velocity. We also need to set their inverse mass. The acceleration
of an object due to gravity is also held in the rigid body (this could be removed
and replaced by a force, if you so desire).
2. The force generators are used to keep track of forces that apply over several frames
of the game.