Jump to content

Pause particle emitter.


proton-drizzle
 Share

Recommended Posts

I'm looking into how to pause a particle emitter without pausing the whole game.

I can stop the emitter emitting, and changing alpha overriding the emitter's update but that doesn't control their movement, nor does the particle's update.

 

Can anyone shed any light on what controls/updates the particles movement/position?

 

thanks

 

Link to comment
Share on other sites

There is no way to do this 'natively', i.e. no single function for it. But an Emitter is basically just a Group and each Particle a child of that Group.

 

You could craft a custom Particle class that has some logic in it that stops it's Body.preUpdate method being called, or you could use Group.setAll to do something like body.moves = false on all children.

Link to comment
Share on other sites

Thanks Rich, I eventually overwrote enough functionality to stop them moving, animating and dying. A combination of all of what you talked about.

I would be happy to put a piece of production ready code together if you think there might be demand for it?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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