Jump to content
  • Advertisement

Archived

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

Ys

Basic collosion detection

This topic is 6100 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

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!