Sign in to follow this  

Collision Detection with 2 OpenGL Primitives

This topic is 4073 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 am new to this fourm and relatively new to C++. I have a program that renders 2 primitives, a triangle and square. The program also lets the user move the triangle and the square follows it but when the square gets to the triangle it just overlaps it. I would like to be able to write some collision detection code that will make it so they won't overlap. If someone could help me or point me in the right direction I would greatly aprricate it. Thanks!!!

Share this post


Link to post
Share on other sites
I'm relativly new to C++ and OpenGL as well, and I have been starting to do some collision detection. It's been hard to find any actual code, but i have found a couple sites that have helped me understand the theory side of it.

General Collision Detection for Games Using Ellipsoids - This article is awesome, and has some psuedo code. it can get pretty complicated though.

Geometry Algorithm Archive - This site has a bunch of algorithms relating to geometry in both 2D and 3D.

http://www.gamedev.net/community/forums/topic.asp?topic_id=419878 - This is the topic where I asked for help. It has some useful information.

Hope this helps! I just want to let you know that 3D collision detection is WAY harder than it appears, and can really be a pain.

Share this post


Link to post
Share on other sites

This topic is 4073 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this