Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Particle Manager/Emitter in Container


ghclark2
 Share

Recommended Posts

Hi,

I've added a particle manager to a container and created three emitters within it. The first emitter appears to inherit its position from the container as you'd expect, but the second and third emitters seem to be doing something weird in terms of positioning. I could try adding three managers each with one emitter, but was wondering if there was a reason why the three emitters in one manager doesn't work...

Thanks, Gordon

 

'this' in the context below is the container.

  addEngines() {
    // create attached particle emitter
    this.particles = this.scene.add.particles('particleBlue')
      .setDepth(this.depth + 1);

    this.add(this.particles);
    this.emitterBottom = this.particles.createEmitter({
      x: -19,
      y: 10,
      scale: { start: 0.5, end: 0 },
      blendMode: 'ADD',
      frequency: 25,
      speed: 25,
    });

    this.emitterTop = this.particles.createEmitter({
      x: -19,
      y: -10,
      scale: { start: 0.5, end: 0 },
      blendMode: 'ADD',
      frequency: 25,
      speed: 15,
    });

    this.emitterFront = this.particles.createEmitter({
      x: 20,
      y: -20,
      scale: { start: 0.5, end: 0 },
      blendMode: 'ADD',
      frequency: 25,
      speed: 35,
    });

  }

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...