VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Best 2D collision detection? Almar Joling (7 replies, 0 views) (2000-Jul-29) In my game Quadrant Wars (2D, top-down) I need a very accurate collision detection.
Does anyone have a good method for collision detection?
I'm aware of the InterSectRect API, but it only works with rectangles, so the mask part of the ships are also counting as 'collision' (even if you remove some part of the ship by shrinking the rectangle)
intersect, fast but inaccurate
Pixel by pixel. As far as I know this only works when you've got a mask at the back containing so that oyu can look if it contains any different colour than the mask one.
pixel by pixel is a synonym for slow, but accurate btw ;o)
Distance. Getting the distance between two objects from the center.
A bit slower than intersect, but also a bit more accurate. yet not accurate enough.
Does anyone have a good way for 2D collision detection?
Any help apreciated & thanks in advance,
Almar Joling
Visit Quadrant Wars @ http://www3.ewebcity.com/stqw
|