Wrapping Box2D Debug into a Cocos2D Layer
Posted by John Wordsworth on September 09, 2011 in iOS Development tagged with box2d, cocos2d, cocos2d-iphone, iOSWhen I first started integrating Box2D into my Cocos2D project, I found the whole process a little jarring. While I'd used C++ before, this was the first time I'd seen it mixed with Objective-C. This code snippet simply wraps the standard Box2D Debug calls from GLES-Render.h (included with Cocos2D) in it's own CCLayer, so that you can implement it quickly and easily. It also allows you to turn the layer on an off easily as you would any other CCLayer.
Continue ReadingView Comments (3)
