[ParticleUniverse]update emission rate at runtime

Problems building or running the engine, queries about how to use features etc.
Post Reply
xelon
Halfling
Posts: 91
Joined: Mon Jan 07, 2013 4:24 am
x 13

[ParticleUniverse]update emission rate at runtime

Post by xelon »

Hey,
I don't know if this is possible in particle universe yet, but I'm trying to update the emission rate of a particle emitter I have in my application. For example, I want the rain particle emitter to start by emitting few particles, then after a while increase that. I would like to be able to control the emission rate from withing my application in real time. Is this possible? and how?
I tried to look into DynamicAttribute, but I can't find a function to set the actual fixed value.

Code: Select all

ParticleUniverse::DynamicAttribute* da ;
da = RainParticle->getTechnique(0)->getEmitter(0)->getDynEmissionRate();
da->setType(ParticleUniverse::DynamicAttribute::DAT_FIXED);
//somewhere here I should be able to specify the DAT FIXED value, but I don't know how! let's say to 500.
RainParticle->getTechnique(0)->getEmitter(0)->setDynEmissionRate(da);
Thank!!
Ludoria now on Kickstarter! Ludoria is now on KickStarter! https://www.kickstarter.com/projects/17 ... g-rpg-game
Ludoria's official website http://www.Ludoria.com
On Facebook https://www.facebook.com/pages/Ludoria/644733108967479
On Twitter https://twitter.com/LudoriaGame
Post Reply