Game Development Reference
In-Depth Information
a driving game will model cones and fences, allowing them to break and be scattered
realistically, for example. In situations where different kinds of physical behavior need
to interact, there is little to substitute for a complete physics engine.
Ragdolls are the hot physics application of the moment: characters that can be thrown
around and generate their own realistic animation using physics. They are part of
a wider move toward procedural animation: animation that doesn't need an artist
creating keyframes.
A ragdoll is made up of a series of linked rigid bodies (see figure 17.2). These
rigid bodies are called “bones” (they roughly correspond to the bones used in skeletal
animation, although there can be a different number of ragdoll bones and rendering
bones). At their most complex, ragdolls can contain dozens of bones, essential for
getting a flexible spine or tail.
The bones are connected together with joints: constraints very much like those
we saw in chapter 7. Finally, in some games force generators are added to the joints to
simulate the way characters would move in flight: shielding their faces and trying to
brace their hands against the fall.
On the CD the ragdoll demo omits the force generators 1
but includes the joints
to keep the bones together.
The constraints are implemented as contacts. In addition to the regular contact
generator, a list of joints is considered and contacts are generated to keep them to-
F IGURE 17.2
Screenshot of the ragdoll demo.
1. I left these out because there are some important complications in their implementation. These com-
plications arise from the way people move: it is a problem of AI rather than of physics.
Search Nedrilad ::

Custom Search