Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only Integrating Box2D collision detection in my 2d engine?

I have integrated box2d in my engine, ( Debug Draw, etc. ) and with a world I can throw in some 2d squares/rectangles etc.

I saw this post, where the user is basically not using a world for collision detection, however the user doesn't explain anything about how he's using the manifold (b2Manifold), etc.

Another post, is in the cocos2d forum, ( scroll down to the user Lam in the third reply )

Could anyone help me a bit with this?, basically want to add collision detection without the need of using b2World ,etc etc.

Thanks a lot!

like image 530
Goles Avatar asked Oct 14 '22 06:10

Goles


1 Answers

Is there any reason you can't use a b2World? Just because you use it, doesn't mean you have to use the physics simulations, unless you're severely performance limited.

See this example on using Box2D for collision only in Cocos2d. Maybe you can apply something similar to your project: http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone

like image 113
badgerr Avatar answered Nov 03 '22 02:11

badgerr