I'm making a simple sidescrolling game where I have a main character sprite and ground sprites. To keep the ground moving, I added all the ground sprites to a new ground layer. I then added the ground layer to my scene and moved the ground layer as a whole. It's all working fine till here.
Now I'm trying to work with Box2d collision, where I want my character sprite to detect where the ground is (the ground changes in height). So I followed this tutorial: http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone. It went fine until I got to the 'Enabling Box2D Debug Drawing' part.
I used the addbodyforsprite method form the tutorial and passed in my main character and ground sprites. My main sprite's pink box is working fine. But the ground is really acting weird. The pink boxes for the ground appears when I start the game then moves off screen and I never see it again. Also, the pink boxes do not follow the movement of the ground sprites.
Pls pardon the confusion, box2d is new to me. Any idea what I can do in this situation? Thanks