改变粒子节点到新坐标后,旧坐标位置为何会存在残留?

鼠标点击,从节点池get 粒子节点,并设置位置为鼠标点击坐标、startRadius=75、totalParticles=200等属性后,0.2s 定时器后改变 startRadius为0,totalParticles为0,并put节点到节点池。
鼠标连续点击,上一次的粒子会残留,是怎么回事?

        let particleNode = PoolManager.instance().getNode(this.particle, this.uiGridsRoot);
        particleNode.setPosition(gridNode.position);
        particleNode.getComponentInChildren(ParticleSystem2D).startRadius = 75;
        particleNode.getComponentInChildren(ParticleSystem2D).totalParticles = 200;

        this.scheduleOnce(function() {
            particleNode.getComponentInChildren(ParticleSystem2D).startRadius = 0;
            particleNode.getComponentInChildren(ParticleSystem2D).totalParticles = 0;
            PoolManager.instance().putNode(particleNode);

       }, 0.2);

微信截图_20220603235716

  • Creator 版本: 3.5

  • 目标平台:chrome

解决了,把粒子属性里的position type设置为grouped,就可以整体控制粒子消失显示,不会残留了
image

该主题在最后一个回复创建后14天后自动关闭。不再允许新的回复。