CCSpriteBatchNode and CCLayers

CCSpriteBatchNode and CCLayers
0.0 0



I have a problem with CCSpriteBatchNode.

I have CCScene with several CCLayers, each layer contains a bunch of sprites. For example:

Layer1: "sprite_1.png", "sprite_2.png", "sprite_2.png", "sprite_2.png", "sprite_1.png"
Layer2: "sprite_1.png", "sprite_3.png", "sprite_3.png"

I do following: for each layer I create several CCSpriteBatch nodes (each node for unique texture of that layer), then I create CCSprites and add them as children in CCSpriteBatchNode. In other words, I have the following structure:

Layer1: Batch1 (has two child CCSprites of “sprite_1.png”), Batch2(three CCSprites of “sprite_2.png”)
Layer2: Batch1 (one CCSprite of “sprite_1.png”) and Batch2 (two CCSPrites of “sprite_3.png”)

So, the problem is that some of the sprites are drawn incorrectly. I.e., they are placed wrong and rotated in the wrong direction. And I don’t know why.
Maybe I use CCSpriteBatchNode in the wrong way? Can anyone help me with this?

Thank you!