Jump to content

Pixi Particles Emitter - How to make it move from point to point


Recommended Posts

  • 2 years later...

Hello, I've been trying to follow what @ivan.popelyshev mentioned without any results.

This is how my code looks like.

const config =
  speed: {
    start: 1,
    end: 5000,
    minimumSpeedMultiplier: 0.1
  lifetime: {
    min: 1,
    max: 1
  frequency: 0.008,
  spawnChance: 1,
  particlesPerWave: 1,
  emitterLifetime: 1,
  maxParticles: 1,
  pos: {
    x: 0,
    y: 0

    const emitter = new Emitter(container, [Texture.from('/particle.png')], config)
    let counter = 0
    this.app.ticker.add(delta => {
      counter += 100
      emitter.updateSpawnPos(10, counter)

But the particle is not moving on the Y axis. What am i doing wrong?
Thank you.

Link to comment
Share on other sites

Hello, and Welcome to the forums!

Well, its still there: https://github.com/pixijs/pixi-particles/blob/df3ca2c7aa8789f1cca266459b6746356990d261/src/Emitter.ts#L704

It should work. If it doesn't work, there's only one way to fix it - use devTools to debug the creation of the particles and why are they in the same point all the time.

This is not my plugin and I have not enough experience in it to just deduce the answer from your code.


Link to comment
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.

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.


  • Recently Browsing   0 members

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