Game Development Reference
In-Depth Information
the model design), and they need to have very high spring coefficients to avoid look-
ing too bouncy. The hairbounce demo on the CD gives a simple example of this in
action.
6.4
S UMMARY
A surprising number of physical effects can be modeled using Hook's law. Some ef-
fects, such as buoyancy, have such similar properties to a spring that they are most
simply supported using the same code.
We've built a set of force generators that can be used alongside the remainder of
the topic to model anything that should appear elastic or buoyant. But we've also seen
the start of a problem that motivates the whole of the rest of the topic: springs with
high spring constants (i.e., those that have a fast and strong bounce) are difficult to
simulate on a frame-by-frame basis. When the action of the spring is faster than the
time between simulated frames, then the spring can get unruly and out of control.
If it weren't for this problem, we could simulate almost anything using springlike
forces. All collisions, for example, could be easily handled. Even though we were able
to fake stiff springs in some cases, the solution wasn't robust enough to cope with
stiff springs in the general case, so we need to find alternative approaches (involving
significantly more complex code) to handle the very fast bounce of a collision. Chap-
ter 7 looks at this: building a set of special-case code for handling collisions and hard
constraints such as rods and inelastic cables.
Search Nedrilad ::




Custom Search