1

I have some sprites that I've added to a CCSpriteBatchNode. Everything shows up fine. Now I want to see their bounding boxes.

I've tried going into ccConfig and turning on CC_SPRITE_DEBUG_DRAW but all I get are white squares for everything: the tiles I use for the level, the characters, etc.

I can't use the draw method for the sprites as they are being drawn through the batch node and it never gets called.

I'm using cocos2d-iphone v2.0.

So is there a way to draw a bounding box for a sprite that's being drawn via the batch node?

iosdev69
  • 11
  • 1

1 Answers1

0

In ccConfig.h change

#define CC_SPRITEBATCHNODE_DEBUG_DRAW 0

to

#define CC_SPRITEBATCHNODE_DEBUG_DRAW 1

Hope this helps! p

ohthepain
  • 2,004
  • 3
  • 19
  • 30