Archived

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

collision detection help?

This topic is 6168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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