Pixel collision

Started by
6 comments, last by GameDev.net 18 years, 4 months ago
How would i approach having pixel perfect collision? i have no idea where to even start...
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Advertisement
in 2D or 3D?
As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.
First you should learn about box collision, as that is the first step to take for per-pixel collision. Are you doing this with OpenGL or SDL or what?
Link
2D and i'm using DX
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
that makes sense about the overlapping pixels.. but how would i be able to see if the pixels are overlapping BEFORE i render them?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
I don't have much experience with pixel-perfect collision detection, but I'd think that if you want feedback information such as time of intersection and/or contact points and normals, you'd be better off using geometrical proxies such as circles, boxes, or convex polygons. Just a thought.
For simple discrete collision, ANDing two 1 bit bitmasks together is really fast. If you find a value != 0 after ANDing you have a collision.

This topic is closed to new replies.

Advertisement