Game Development Reference
In-Depth Information
the collision so that it can be easily checked in the next time increment.
Since the topology of a scene ensures that a collision is likely to occur
over several time increments, this can make a huge difference to the
number of tests required to confirm collisions. Another useful technique is
to model a low resolution collision mesh that provides the accuracy
required at a much reduced face, vertex count. As polygon meshes start
to hit the 10 000 face level in a single character, it is usually unnecessary
to calculate collisions to this level of refinement and a 300 face collision
mesh will provide the necessary accuracy at a greatly reduced computa-
tional level.
Reacting to a collision
Most applications will handle collisions differently. The first thing to
remember is that if your code starts an action as a collision occurs it does
not want to be allowed to restart this action if the collision test is confirmed
in the next time increment. If this is allowed to happen, then the character
enters a jitter phase where it bounces between two positions. Better to let
a collision-provoked action complete before testing collisions again. A
Figure 13.12 Aligning a character's action to a wall.
Search Nedrilad ::

Custom Search