Game Development Reference
In-Depth Information
x2
p=q
x1
p=q=x1
x2
Figure 11.4. Resolved stick collisions.
by
x 1 = x 1 + c 1 λ d ,
x 2 = x 2 + c 2 λ d ,
x 3 = x 3 + c 3 λ d ,
x 4 = x 4 + c 4 λ d .
The new position of the tetrahedron's penetration point p = c 1 x 1
+ c 2 x 2
+
c 3 x 3 + c 4 x 4 will coincide with q . For details on the derivation of the above
equations, see [Jakobsen 01]. The above equations can also be used to embed the
tetrahedron inside another shape, which is then used for collision purposes. In
this case, p will be a point on the surface of this shape (See Figure 11.5 ) .
Figure 11.5. Tetrahedron (triangle) embedded in arbitrary object geometry touching the
world geometry.
In the above case, the rigid body collided with an immovable world, but the
method generalizes to handle collisions of several (movable) rigid bodies. The
collisions are processed for one pair of bodies at a time. Instead of moving only
p , in this case, both p and q should be moved towards one another.
 
Search Nedrilad ::




Custom Search