Game Development Reference
even a small number of stacked objects) this isn't a problem. For large stacks the
errors can mount until at the top they are very noticeable.
Judicious use of putting objects to sleep means that stacks can be made to appear
stable. If you need a brick wall to be blown apart, this is a good strategy and won't
show the engine's limits.
R EACTION F ORCE F RICTION
As we saw in the last chapter, reaction force friction is honored when a contact is
being resolved, but not when a contact is moved as a side effect of another resolution.
This makes it difficult for one movable object leaning against another to stay in place.
The objects will appear to slide off each other, regardless of the frictions imposed. The
best that can be hoped for is that the sleep system kicks in to stop them from sliding
This is another side effect of the interpenetration resolution algorithm: it doesn't
honor the friction of one contact when considering the penetration resolution of an-
J OINT A SSEMBLIES
The same cumulative errors that cause stacks to become unstable can also lead to no-
ticeable artifacts when long strings of rigid bodies are connected by joints. In addition
to making a full range of joints a burden to program, our engine considers each joint
in series. Joints at one end of a chain can be dramatically affected by adjustments at
the other end.
This can be as mild as a slight stretching of some of the joints, through a slow-
down in the processing (where all the available iterations are used up), to vibration,
and at the most extreme, catastrophic failure.
Iterative resolution isn't the best option for highly constrained assemblies of rigid
bodies (although it can cope with modest groupings like our ragdoll): if this is your
primary application, then it's best to go for a simultaneous solver.
S TIFF S PRINGS
Finally we get to the bugbear from the second part of the topic. Stiff springs are as
much a problem for our full rigid-body engine as they were for the particle engine,
and for exactly the same reason. While it is possible to use faked force generators, as
we did in chapter 6, the problem can't be entirely solved.
Almost anything that can be done with a game physics engine can be done with the
physics engine we've built in this topic. As we've seen in this chapter, it can be used to
run all the “hot” applications for physics in games.