Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a 3d kindof game where I'll eventually be able to modify the shapes present in the environment by pulling their faces with a crosshair. The thing is that I don't know how to achieve ray-quads or ray-triangle collision. I did it once with a teacher at school, but he didn't have much time and it was not well constructed (+I lost this code). I was also wondering how I could check for theses collisions with thousands of shapes? Because I know this is quite resource-demanding and doing this for 1000 spheres/cube/freeform shapes is not easy. If anyone could help me push my knowledge a bit further, it'd be very much appreciated!

I also work in Java using LWJGL, so OpenGl.

share|improve this question
If you don't have a copy of Real-Time Collision Detection within easy reach while coding, your early years of game development are going to be rough. Buy a copy. It explains collision algorithms, bounding volumes, spatial hierarchies, and essentially all the answers to your questions on this topic. – Sean Middleditch Jun 17 '13 at 6:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.