[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Collision detection Re: Is this list still alive?

On Fri, Jan 12, 2001 at 12:39:27PM +0200, Jan Ekholm wrote:

> One way *could* be to use bounding spheres around your objects, and check
> wether the sphere is within a distance less than its radius from some
> other object. Should work for a quite fast approximation. When you have a
> collision (or possible collision) use some more finegrained checks, such
> as separate bounding spheres for various parts of the objects involved.
> For walls, floors etc the use of bounding spheres is not ideal, for those
> cases you could try to get the equation for the plane surface and
> calculate the distance between the plane and the bounding spheres.

I intend to use a bounding cylinder.  It needs to be raised slightly above
the ground to allow for uneven and sloping floors.  Now I just need to work
out how to do the cylinder/triangle intersection test.

Christopher John Purnell  | A friend in need's a friend in deed
http://www.lost.org.uk/   | A friend with weed is better
--------------------------| A friend with breasts and all the rest
What gods do you pray to? | A friend who's dressed in leather

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.dk
For additional commands, e-mail: linuxgames-help@sunsite.dk