Advertisement

2D image, pixel perfect collision detection

Started by October 15, 2002 05:41 AM
5 comments, last by TerraX 22 years, 4 months ago
Hi, just trying to get pixel perfect 2D collision detection working using OpenGL''s orthographic projection. Just wondering how I would go about achieving this? Hmm, Stencil buffer? Picking? I dunno, having major trouble Thanx in advance, Dave.
Is glReadPixels() is what you need?
Advertisement
or is this post has to be in the graphics theory forum?
____________________________________MSN | AIM | YIM | ICQ
varokasp, thanx for the idea, but I read somewhere that using readpixels is slow, is that true?

daher, I think I''ll go browse through the posts there, I forgot about all the other gamedev forums
Sheesh, I can''t wait for the search facility to be availiable again!

Thanx you two,
Dave.
I''m going to use the same and i have found this link:
http://www.gamedev.net/reference/articles/article735.asp

Hopes this help
Killgore
Killgore, thanx for that article link, it gave me some cool ideas for optimisation (Only checking the pixels that overlap)

Thanx,
Dave.
www.davesprogramming.com
Advertisement
Glad to be of assistance...
I think that checking for small objects against large objects is one of the more usefull checks, I''m going to use that extensively as I''m programming a 2d shooter with lots of missiles flying towards the hero character!

BR
Killgore

This topic is closed to new replies.

Advertisement