Subject: Collision detects

From: [email-masked].
Date: Mon, 31 Jan 94 14:13:52 -0500

Okay, here goes:

For each object do the following:

First, describe the object as an equation.  This is easier said than
done I know, unless if it's an orthagonal or infinite rectangle, but who cares?

Then define the viewer's path as a vector.

Use a gaussiasn elimination on the two equations (use matrices, of
course!) to determine if the vector hits the object at all.  If it
does, see if the hit is within the current position and the next
position.  If so, any forward movement should just move the viewer to
the point of intersection.  If not, then there's no collision.

Or, for those VRS users among us (!), you can use its algorithm:

(pseudo-code, of course!)
if VX in [obj_X1..obj_X2] then
  if VY in [obj_Y1..obj_Y2] then
    if VZ in [obj_Z1..obj_Z2] then
      there is a collision; therefore I must figure out where the
person really goes!
else
  just let the booger move ahead, okay?!?!

/\      /|
\/____ //____
/ Joshua Shagam

BTW, if anyone here reads Cyber Mag, go to the BBS of the Month column
first.  I do!  (Like I have a choice!)