damien leroux

Members
  • Content count

    2
  • Joined

  • Last visited

About damien leroux

  • Rank
    Newbie

Contact Methods

  • Twitter
    https://twitter.com/DamienLerouxPro
  1. Click on emitter particles doesn't work

    Hello, It doesn't work for me neither. Any clues? Here is my emitter configuration: var balloonsEmitter = game.add.emitter(0, 0, MAX_NUMBER_OF_BALLOONS); balloonsEmitter.enableBody = true; balloonsEmitter.inputEnableChildren = true; balloonsEmitter.onChildInputDown.add(function (balloon, pointer) { balloon.kill(); //delete particle }); balloonsEmitter.gravity = 0; balloonsEmitter.makeParticles('balloonsPop', 0, 5);
  2. Control rotation of particles from particle emitter

    This is an old post but in case it helps anyone, I share the code that can control the particle rotation. In this example, the particle direction go from top to down when falling enough to trigger the particle rotation: particlesEmitter.forEachAlive((particle) => { if (particle.body.velocity.y > 100) { if (particle.animations.sprite.rotation >= 0 && particle.animations.sprite.rotation < Math.PI) { particle.animations.sprite.rotation += Math.PI / 40; if (particle.animations.sprite.rotation > Math.PI) { particle.animations.sprite.rotation = Math.PI; } } } }); Here was my emitter config: const particlesEmitter = game.add.emitter(0, 0, 30); particlesEmitter.makeParticles('firework'); particlesEmitter.gravity = 300; particlesEmitter.setXSpeed(0, 0); particlesEmitter.setYSpeed(-480, -660); particlesEmitter.minRotation = 0; particlesEmitter.maxRotation = 0; fireworksEmitter.lifespan = 5000; Version: v2.6.2 "Kore Springs"