Hi,
I was using Cocos2d-x 3.2 for my game.
I had a clipping node in my scene and a particle emitter in it. When I started using Cocos 3.3 I got the whilte screen and only some layers visible. If I don’t add particles to clipping node all works fine (except, of source, that particles are not clippped). Here is the code
auto clipper = ClippingNode::create();
clipper->setContentSize( Size(227, 363) );
clipper->setAnchorPoint(Vec2(0.5, 0.5));
clipper->setPosition( Vec2(514, 464) );
addChild(clipper, 1);
auto stencil = DrawNode::create();
Vec2 figure[8];
figure[0] = Vec2(46, 12);
figure[1] = Vec2(14, 45);
figure[2] = Vec2(14, 310);
figure[3] = Vec2(60, 354);
figure[4] = Vec2(170, 354);
figure[5] = Vec2(217, 310);
figure[6] = Vec2(217, 45);
figure[7] = Vec2(170, 12);
Color4F white(1, 1, 1, 1);
stencil->drawPolygon(figure, 8, white, 1, white);
clipper->setStencil(stencil);
auto emitter = ParticleSystemQuad::create("main/RainParticle.plist");
emitter->setScale(1.5);
emitter->setPosition( Vec2(clipper->getContentSize().width/2 -50, clipper->getContentSize().height + 10) );
clipper->addChild(emitter);
This is a shape of the clipper
This is how is should look (small rain particles under the “glass”)
This is how it looks now (in v.3.3)
What might the problem be?
Thank you for your help.