Page 1 of 1

debug draw not working on cocos2d v2.0

Posted: Tue Jun 12, 2012 4:58 pm
by marciokoko
I had a perfectly working game on cocos2d 1.0.1 and upgraded to 2.0.

After many debugs, Im only left with the fact that my bodies don't have the rectangles around them which used to let me see where they were. I was using them to debug. How do i get them back? I have cp6.1 because I remember upgrading a few weeks back. But for some reason the console says:

Initializing cpSpace - Chipmunk v6.0.3 (Debug Enabled)

Maybe since its as far up as cocos2d v2 rc2 recognizes...?

Re: debug draw not working on cocos2d v2.0

Posted: Tue Jun 12, 2012 6:52 pm
by ksjogo

Re: debug draw not working on cocos2d v2.0

Posted: Tue Jun 12, 2012 9:55 pm
by marciokoko
Cool thanks, I'll look into it.

So let me understand this, the fact that cocos2d version changed, breaks the chipmunk debug functionality?

So it's probably why my box2d debug draw is failing as well?

Re: debug draw not working on cocos2d v2.0

Posted: Wed Jun 13, 2012 4:16 am
by ksjogo
Cocos2d 2.0 is using GLES 2.0, thus the old draw functions do not work and need to be changed to the new ones.

Re: debug draw not working on cocos2d v2.0

Posted: Wed Jun 13, 2012 9:50 am
by marciokoko
OOOooh! Nice and green! :)

Thanks @ksjogo, highly appreciated. You wouldn't happen to know how to fix my box2d debug draw would you?

Ill go post over there :)

Thx again!

Re: debug draw not working on cocos2d v2.0

Posted: Wed Jun 13, 2012 5:39 pm
by ksjogo
You could take the drawing code from the CPDebugLayer and insert it into the box2d calls - but better ask there.;)