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

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



On Fri, 12 Jan 2001, Chris Purnell wrote:

>On Thu, Jan 11, 2001 at 05:53:24PM +0100, Mads Bondo Dydensborg wrote:
>
>> I think most people use collision detection for this.
>
>That is just so unhelpful.  Anyway I've got an idea about how I'm going
>to do it now.  However, I don't know when I'll get around to coding it,
>What with this Loki game I've just bought sitting on my desk and all.

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.

--------------------+--------------------------------------------------------
Jan 'Chakie' Ekholm |     Balrog New Media    http://www.balrog.fi/
   Linux Inside     | I'm the blue screen of death, nobody hears your screams


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