I’m using ParticleSystem3D
in Cocos 2.4.13. Most of the time, it plays normally when I replay it, but occasionally it flickers or flashes unexpectedly.
Here’s the function I’m using to control the particle playback:
controlParticles3D(node, play) {
let particle = node.getComponent(cc.ParticleSystem3D);
if (particle) {
if (play) {
particle.stop();
particle.clear();
this.scheduleOnce(() => {
particle.play();
}, 0);
} else {
particle.stop();
}
}
if (node.children.length > 0) {
node.children.forEach(child => this.controlParticles3D(child, play));
}
}
Has anyone encountered this issue? Is there a known workaround or a better way to reset and replay ParticleSystem3D
?