Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.