Archived

This topic is now archived and is closed to further replies.

Krusty95

collision detection help?

Recommended Posts

Krusty95    122
Ok, what I''m trying to do is get some kind of collision detection between a box and a RGB color. I just need something that will check to see if the box is colliding with a certain color in 16 bit. Also, it is DirectX that I''m using and yes it is 2D. So if anyone could please help me I would really appreciate it. Thanks. Krusty95

Share this post


Link to post
Share on other sites
Jonppe    122
First you would have to get the color of the pixel. You could use LPDIRECTDRAWSURFACE->Lock funktion. See directx manuals for help ''how to access video memory directly''

Then check whether the pixel''s coordinates are inside the box.

Hope this helps.

Share this post


Link to post
Share on other sites