Game Development Reference
In-Depth Information
17
P UTTING I T A LL
T OGETHER
body, detect collisions between objects, and realistically resolve those colli-
sions. It is capable of running the physics for a huge range of games. Now it's time to
put it through some paces.
Before we work through the demonstration applications, it is worth taking stock
of where we have come from and looking at the physics engine as a whole.
We have built a complete physics engine that can simulate any kind of rigid
17.1
O VERVIEW OF THE E NGINE
The physics engine we have built has four distinct parts:
The force generators (and torque generators) examine the current state of the
game and calculate what forces need to be applied to which objects.
The rigid-body simulator processes the movement of rigid bodies in response
to those forces.
The collision detector rapidly identifies collisions and other contacts both be-
tween objects and between an object and the immovable parts of the level. The
collision detector creates a set of contacts to be used by the collision resolver.
The collision resolver processes a set of contacts and adjusts the motion of rigid
bodies to accurately depict their effects.
Each of these components has its own internal details and complexities, but we can
broadly treat them as separate units. Notice that there are two kinds of internal data
used in the preceding components:
Search Nedrilad ::




Custom Search