Simple explosion with particles

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
fronald
Posts: 7
Joined: Sun Nov 15, 2015 4:10 am

Simple explosion with particles

Post by fronald »

Hi guys,

I need of a simple explosion effect, like a simple emitter with one single shot of some particles.
I'm trying do it creating emitter and delete one second after, but the particles disappear abruptely.

Anyone know how do it?

Thanks,
AReichl
Posts: 270
Joined: Wed Jul 13, 2011 2:34 pm

Re: Simple explosion with particles

Post by AReichl »

Stop emitting first and THEN delete some seconds later.
fronald
Posts: 7
Joined: Sun Nov 15, 2015 4:10 am

Re: Simple explosion with particles

Post by fronald »

Nice. But... How stop emitter? Sorry by the question but i not found a method called stop or anyhng like it.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Simple explosion with particles

Post by CuteAlien »

I suspect (not tried) you can call setEmitter(0) on the IParticleSystemSceneNode to stop it emitting.
Or maybe better - call setMaxParticlesPerSecond for the emitter and reduce that number (to 0 or a low value).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
fronald
Posts: 7
Joined: Sun Nov 15, 2015 4:10 am

Re: Simple explosion with particles

Post by fronald »

Thank you! Works perfect.

Code: Select all

 
this->explosionParticleEmitter->setMaxParticlesPerSecond(0); // Stop emission
 
Post Reply