Original Post
in my game i have robots, and i want to know if something has hit them, and if so, from which angle.
ie. did the bullet hit them from the front, left, right, back, front-right, etc.
i am seperating the circle into 16 parts around the bot, so if the bot keeps getting hit from the right side, the armor on the right side will get worse and worse, but the left side, front, etc will still be perfect.
if i have the center of the robot (RX, RY), and the center of the "bullet" (TX, TY), you find the angle between them with
tan((RY - TY) / (RX - RX)) correct?
this works fine for circular bounding boxes, but what if the two things being collided with aren't circular? such as two 4-sided polygons (2d of course).
could you point me to any (fast) collision detection (URL, tutorial, etc) for this case?... .
or if my post is just incredibly lame, ignore it.
Edited by - jeremiah on 10/24/00 11:32:21 AM