Game Development Reference
In-Depth Information
Figure 17.6 Non-detection of a collision by discrete approach (according to (Redon, 2002))
Backtracking: This solution consists of using a measurement of depth of interpen-
etration and the speed of objects as a base to determine an approximate time of
contact (Hahn, 1988);
Anticipation: An approximation of the moment of collision is calculated. A mini-
mum time during which no collision is possible is obtained using a minimum limit
of the distance and a maximum limit of the speed (Culley & Kempf, 1986; Lin &
Canny, 1992). In this case, we try to find by iteration the moment at which the
distance between the objects is less than a given threshold ε .
However, irrespective of the approach used, it is impossible to guarantee that all the
collisions would be detected. In fact, it may happen that the objects pass completely
through each other between two inspections (we are talking about the “tunnel effect'').
In practice, if t is the time interval between two inspections and V max the relative
speed of two objects, the interpenetrations of a length less than l max =
V max ×
t may
not be detected. Continuous temporal detection
Discrete methods cannot guarantee that all collisions will be found, as the time is
discretised and all events occurring between two moments are potentially ignored
(see case b in figure 17.6). Thus, to guarantee finding all collisions, it is necessary
to consider time in a continuous manner. However, the position of objects is not
necessarily known at every single moment. For example, the position of an object
controlled by a peripheral device (keyboard, mouse, glove, etc.) is generally acquired
only at regular time intervals. To define the object's path in time, it is thus necessary to
interpolate its known positions. Let t n and t n + 1 be any two successive moments at which
the positions of objects are known, and I n
[ t n , t n + 1 ] the corresponding intermediate
time interval during which the real movement of the object cannot be used. Then the
randomly selected intermediate movement should:
maintain the physical parameters of the object during the entire movement, i.e. if
the object is rigid, then the distance between any two points of the object should
remain constant during the entire movement;
Search Nedrilad ::

Custom Search