debug draw not working on cocos2d v2.0

Official forum for the Chipmunk2D Physics Library.
Post Reply
marciokoko
Posts: 86
Joined: Thu Jan 12, 2012 11:50 am
Contact:

debug draw not working on cocos2d v2.0

Post 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...?
User avatar
ksjogo
Posts: 5
Joined: Tue Jun 12, 2012 6:37 pm
Contact:

Re: debug draw not working on cocos2d v2.0

Post by ksjogo »

marciokoko
Posts: 86
Joined: Thu Jan 12, 2012 11:50 am
Contact:

Re: debug draw not working on cocos2d v2.0

Post 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?
User avatar
ksjogo
Posts: 5
Joined: Tue Jun 12, 2012 6:37 pm
Contact:

Re: debug draw not working on cocos2d v2.0

Post 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.
marciokoko
Posts: 86
Joined: Thu Jan 12, 2012 11:50 am
Contact:

Re: debug draw not working on cocos2d v2.0

Post 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!
User avatar
ksjogo
Posts: 5
Joined: Tue Jun 12, 2012 6:37 pm
Contact:

Re: debug draw not working on cocos2d v2.0

Post by ksjogo »

You could take the drawing code from the CPDebugLayer and insert it into the box2d calls - but better ask there.;)
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 11 guests