I would like to any tips/articles/tutorials on how to write collision detection using OpenGL and C++ in 3D mainly just simple box collisions etc but also if there are any advanced resources that would be great to. i also don't wont to use any external library`s if possible.


  • \$\begingroup\$ I don't think the OpenGL part will actually make much of a difference. Oh, except you won't be using DXD3DVECTOR or whatever it's called. \$\endgroup\$ – The Communist Duck Jun 16 '11 at 9:54

There will be huge amounts of resources out there, I dont know how much you know about current collision techniques, but a good idea if you're not familar with them could be to download Unity3D and play around with the buit-in physics engine (PhysX).

Box collisions are generally done using AABB's (Axis-Aligned Bounding Boxes), Sphere collisions are faster but obviously can't give you as good a representation for a box for example. Capsule colliders are elongated spheres and are very useful for characters and such.

You should also look for details on Terrain/BSP collision detection depending on what your needs are.

Good simple tutorial for AABB's

Here are a few things I googled (but may not be pertinent)...


Bounding Sphere Collision



You could also look into various Open Source Game engines, and see how they handle collision, like for example panda3d.
You might also take a peek into sources of physics engines like ODE or Bullet


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.