I tried to clip a SpriteBatchNode using this code:
auto containerSprite = ClippingNode::create(mask);
containerSprite->setAlphaThreshold(0);
containerSprite->addChild(batchNode);
addChild(containerSprite);
It’s clipped fine, except the background becomes white, which I don’t want. Is it a correct way to clip a batch node? Or is there another way of doing it?
I’m using cocos2d-x 3.0alpha1
I attached the screenshot
Thanks
clippingnode.png (58.4 KB)