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

*To*: linuxgames@sunsite.dk*Subject*: Re: Collision detection Re: Is this list still alive?*From*: Skjalm Arrøe <skjalm@arroe.dk>*Date*: Mon, 15 Jan 2001 21:44:12 +0100*Delivered-To*: mailing list linuxgames@sunsite.dk*Delivery-Date*: Mon, 15 Jan 2001 15:44:35 -0500*In-Reply-To*: <20010112110200.E7720@oit.net>; from cjp@oit.net on Fri, Jan 12, 2001 at 11:02:00AM +0000*Mailing-List*: contact linuxgames-help@sunsite.dk; run by ezmlm*References*: <20010112100434.B7720@oit.net> <Pine.LNX.4.10.10101121235530.346-100000@infa.abo.fi> <20010112110200.E7720@oit.net>*Reply-To*: linuxgames@sunsite.dk*Sender*: steellynx@ostenfeld.dk*User-Agent*: Mutt/1.2i

On Fri, Jan 12, 2001 at 11:02:00AM +0000, Chris Purnell wrote: > > 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. > I haven't done all the math, but my guess is that a cylinder/triangle intersection test would work more or less like the following: 1) Find two spanning vectors in the triangle (i.e. from one corner to each of the other two) 2) Make a linear combination of these two vectors that lie on the surface of the cylinder's side and then the top and bottom The surface should be fairly simple to describe as a function of the center of the bottom, the radius and the length, but *errrm* I'll leave that part to you ;-) 3) Check if the found solution (if any) is actually within the triangle and on the surface of the cylinder Without betting my life on it, I think you will end up with an intersection line (or a point if a corner of the triangle touches the cylinder) which you should be able to somehow check in part 3 of the above "algorithm". Hope it helps, Skjalm -- It's 21:44:42. Do You Know Where Your Meat Body Is? --------------------------------------------------------------------- To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.dk For additional commands, e-mail: linuxgames-help@sunsite.dk

**Follow-Ups**:**Re: Collision detection Re: Is this list still alive?***From:*Chris Purnell <cjp@oit.net>

**References**:**Re: Collision detection Re: Is this list still alive?***From:*Chris Purnell <cjp@oit.net>

**Re: Collision detection Re: Is this list still alive?***From:*Jan Ekholm <chakie@infa.abo.fi>

**Re: Collision detection Re: Is this list still alive?***From:*Chris Purnell <cjp@oit.net>

- Prev by Date:
**Re: Is this list still alive?** - Next by Date:
**Intersection** - Prev by thread:
**Re: Collision detection Re: Is this list still alive?** - Next by thread:
**Re: Collision detection Re: Is this list still alive?** - Index(es):