Game Development Reference
In-Depth Information
14
C OLLISION
R ESOLUTION
have a set of contact data from the collision detector (from chapter 13), and we
have the rigid-body equations of motion, including torques and forces (from chap-
ter 10). We are now ready to combine the two and have rotating objects respond to
contacts.
Just as in chapter 7, we will first look in detail at the physics of collisions. We are
building a micro-collision physics engine, one in which resting contacts are handled
with numerous mini-collisions (plus a bit of extra special-purpose code). Before we
can get the micro-collisions of resting contacts working, we need to look in detail at
basic collision handling.
This chapter builds the first stage of our contact resolution system to handle colli-
sions. Chapter 15 goes on to incorporate the collision response into more general and
robust contact handling.
Because all contact handling in the engine is based on collisions, this chapter takes
up the largest part of finishing our engine, in terms of book pages, of mathematical
complexity, and of implementation difficulty. If you find this chapter hard going, then
try to persevere: it's mostly downhill from here on.
It's time to look at the final, and most complex, stage of our physics system. We
14.1
I MPULSES AND I MPULSIVE T ORQUES
Recall that when a collision occurs between two objects in the real world, the material
from which they are made compresses slightly. Whether it is a rubber ball or a stone,
the molecules near the point of collision are pushed together fractionally. As they
compress they exert a force to try to return to their original shape.
Search Nedrilad ::




Custom Search