Archived

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

Ys

Basic collosion detection

Recommended Posts

I need help on basic collosion detection with quads ive tried loads of things and cant get it too work also how would i when the collosion occurs to remove that quad from the screen is there a delete quad function or something like that please help me thanks for any help

Share this post


Link to post
Share on other sites
Well, simple detection would be, well, pretty simple.
When you draw the quad, keep track of where on the screen it is.
And I''m sure you''re trying to detect when it gets to a certain place, so you have those coordinates as well.
If the coordinate of the quad +/- the width/height/whatever is greater/less than where you want to no longer display it, then, stop displaying it.
You don''t have to delete the quad, you just stop drawing the quad and it''ll go away (if you''re clearing the GL_COLOR_BUFFER_BIT at least, which I''m sure you''re doing, I hope)

- Mike

Share this post


Link to post
Share on other sites