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

Box2d Collision detection algorithms are probably the best ones out there. Unfortunately, they are bundled together with a realistic physics engine that I don't need.

Is there an open source project out there that strips out the physics part of Box2D, or provides a similar functionality?

share|improve this question
I haven't worked with Box2D, so don't take my word for it, but from what I've heard it should be possible to use only the collision detection part of it and just ignore the rest. – Christian Apr 15 '13 at 21:54
See my answer below for use with Box2D. If you're actually asking for recommendations on libraries to use for collision detection, you should be aware that "which technology to use" questions are not constructive and a bad fit for the Q/A format of the site. – Byte56 Apr 16 '13 at 0:01

You can can decide how to respond to collisions. See this question. You'll use collision filtering for detecting collisions, and simply set the objects not to respond to collisions.

To further remove the physics, you'll want to set the positions of your bodies directly, don't use their velocity values at all. Also remove gravity from the world.

share|improve this answer
If you set the positions of bodies directly, you make it really difficult for the collision detection system to work. It becomes very easy for one object to pass through another, since the objects are arbitrarily warping around rather than smoothly moving. That's why most collision systems are bundled with a physics system. They're inter-related. – Nicol Bolas Apr 16 '13 at 5:04
Agreed. However, that's the only way I see using Box2D, sans physics. I didn't say it would be pretty :) – Byte56 Apr 16 '13 at 5:09

Your Answer


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

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