Advertisement

collision detection help?

Started by January 25, 2001 06:16 PM
0 comments, last by Krusty95 24 years ago
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
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.
God saw all that he had made. Shit happens sometimes. --the sixth day.

This topic is closed to new replies.

Advertisement