UglyDuckling Posted April 4, 2016 Share Posted April 4, 2016 Is there a way to set a alpha value for an entire particle system? This is how I'm currently creating my particle system. // Create particle system this.smokeEmitter = new Phaser.Particles.Arcade.Emitter(this.game, 900, 1140, 300); this.smokeEmitter.makeParticles("Smoke"); this.smokeEmitter.setRotation(0, 30); this.smokeEmitter.setAlpha(0.0, 1.0, 500); this.smokeEmitter.setScale(0.1, 0.8, 0.15, 0.8, 8000, Phaser.Easing.Sinusoidal.InOut, true); this.smokeEmitter.setXSpeed(-5, 30); this.smokeEmitter.setYSpeed(-40, -30); this.smokeEmitter.gravity = -6; this.smokeEmitter.start(false, 30000, 300); The effect I'm looking for is an effect where the particles do not blend in each other and all particles get alpha 0.6, even if they overlap. I have tried setting the alpha using this.smokeEmitter.alpha and I have also tried setting it on a parent group. But nothing I have tried gives me the result I want. Link to comment Share on other sites More sharing options...
stupot Posted April 4, 2016 Share Posted April 4, 2016 I'm pretty sure it works by setting the alpha property of the emitter, eg. this.smokeEmitter.alpha = 0.6 The setApha() emitter function is for setting the individual output particle alpha. Link to comment Share on other sites More sharing options...
UglyDuckling Posted April 4, 2016 Author Share Posted April 4, 2016 Yes, but I does not do what I need it to do. I want to cap the maximum alpha of the particles to 0.6, but currently when they overlay they keep adding to each others also until nothing is transparent. In the image below you can see what sort of effect I'm looking for. Right now the only the only solution I can see is writing a custom shader? Link to comment Share on other sites More sharing options...
Recommended Posts