NumbOfAthma

Phaser Particle Storm - Move emitter

Recommended Posts

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.