NumbOfAthma Posted March 21, 2017 Share Posted March 21, 2017 Hi guys, Is there any way you can change the position of an emitter created with Particle Storm from (x,y) to (x1, y1) and then to (x2, y2)? Any ideas? --- Or how to destroy an emitter? Link to comment Share on other sites More sharing options...
rich Posted March 21, 2017 Share Posted March 21, 2017 When you emit a particle you specify the x/y coordinate to emit from, here, this is from the 'mouse trail' example: emitter.emit('spark', game.input.x, game.input.y, { total: 1 }); And it's called in the update function. Link to comment Share on other sites More sharing options...
hermbit Posted June 20, 2017 Share Posted June 20, 2017 I found a way to move the actual position of the renderer (In this example, it is a Pixel renderer, but this may apply to other renderers too). Here you can set things like x/y coords and anchor: let manager = game.plugins.add(Phaser.ParticleStorm); let emitter = manager.createEmitter(Phaser.ParticleStorm.PIXEL); emitter.renderer.display.x = 250; emitter.renderer.display.y = 700; emitter.renderer.display.anchor.setTo(0.5, 0.5); Note that by doing this, the position of any particles made by this emitter will be relative to the display x/y. Link to comment Share on other sites More sharing options...
Recommended Posts