Skip to main content
GameDev.net gamedev.net
🔒 Locked

Collusion Detection

Started by miketravars Mar 26, 2004 at 1:48 PM 4 replies 1.1k views
Original Post
miketravars
miketravars
Hey- I''ve been programming for going on 8 years, but I''m just starting to learn graphical programming. So...if this is old stuff, please let me know!! In 2D: Given a shape drawn of any number of points around a center, where the more points that exist, the closer the shape represents a circle (i.e. no ''dents''): In order for a collusion to occur between two of these shapes: Find the closest point in Shape A to Shape B (excluding the center point) Ditto for the closest point in Shape B to Shape A Distance(ClosestA, CENTERB) < Distance(ClosestB, CENTERB) Is there a case when this can''t be true?
Escherial
Escherial
Sure, what if you have two very narrow triangles that intersect, yet none of the points of one lie within the area of the other? Also, the word you''re looking for is "collision", not "collusion", which means cooperation.
Palidine
Palidine
hi, my name is homework. you can''t ask for answers to me here

-me
miketravars
miketravars
Palidine-
I graduated with my BS in CS at age 18 (I''m 24 now). Haven''t been to school since. But thanks!


Escherial-
It follows to reason that if the test is done both ways, that can''t be true, can it?

I.E.

Distance(ClosestA, CENTERB) < Distance(ClosestB, CenterB)
||
Distance(ClosestB, CENTERA) < Distance(ClosestA, CenterA)

(Forgive my psuedocode, and my lack of grammer. I did skip a few classes *grin)


Genjix
Genjix
hm is this assuming there is no overlap between said polygons?
Distance( CenterA , ClosestA ) < Distance( CenterA , ClosestB )

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.