🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenGL Collision Detection Question !!

Started by
4 comments, last by hallucinogenix 24 years ago
sup? im kinda new to openGL, and so far i''ve gotten polys, animated textures, particles systems..blah,blah, etc. Well, i decided i wanted to make a game engine, and i was trying to implement collision detection. i was thinking of throwing a my camera into a struct, so i can compare the xyz cords to the closest glVertex. But theres one problem, im trying to find out how you would go about detecting, that there is infact a vertex in a certin radius of my camera. How would openGL know that a vertex is in that certin position. SOME ONE PLEASE HELP!!! -[ hallucinogenix ]-
Advertisement
> How would openGL know that a vertex is in that certin position.

OpenGL doesn''t. You can''t do collision detection with OpenGL, you have to write your own collision detection functions, I''d suggest reading through some of Paul Bourke''s stuff on various types of collision detections and intersections on his geometry page (http://www.swin.edu.au/astronomy/pbourke/geometry/).

Morgan
humm...i gave it a bit of thought, and i decided to use a BSP TREE collision detection. DOES ANYONE KNOW OF ANY GOOD OPENGL BSP TREE TUTORIALS?? thanx !!
have you tried, uh, i dont know, LOOKING FOR IT before asking that question?

--
Float like a butterfly, bite like a crocodile.

--Float like a butterfly, bite like a crocodile.
There''s one at OpenGL Game Programmming (http://shockonline.homestead.com/openglgameprogramming.html). There''s a BSP FAQ which gives quite a lot of info at http://reality.sgi.com/bspfaq/, and Nate (http://nate.scuzzy.net/) said he''s going to be writing a BSP tutorial (he already has a leafy BSP tree example on his site).

Morgan
ok, cool, thanx alot peeps! im gonna go read some shit on
bsp leaves! hope i understand it, so i can use editors like qeRAD2 in the future. it would be so much easier to create landscapes that way. thanx again. -[ hallucinogenix ]-

This topic is closed to new replies.

Advertisement