2
\$\begingroup\$

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.

thanks

\$\endgroup\$
1
  • \$\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\$ Commented Jun 16, 2011 at 9:54

2 Answers 2

3
\$\begingroup\$

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)...

http://www.gamasutra.com/view/feature/3383/simple_intersection_tests_for_games.php

Bounding Sphere Collision

http://www.essentialmath.com/CollisionDetection.pps

\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .