Modify Particle Emitter
Posted: Sun Mar 27, 2005 4:39 pm
I'm trying to figure out the best way to modify a particle emitter. My understanding of C++ is still somewhat limited so pardon me if the answer is something obvious.
I need to update the direction/Lifetime of my particles to match my craft as it moves.
I've built an emitter like so:
Is the only way to update the emitter for my particle system to create a new one and then re-apply it to my particle system e.g. tmp->LEngineFX->setEmitter(tmp->NEWLEngineFXEmit);
This seems like it would take more process/memory then neccessary.
Thanks for any help!
I need to update the direction/Lifetime of my particles to match my craft as it moves.
I've built an emitter like so:
Code: Select all
tmp->LEngineFX = smgr->addParticleSystemSceneNode(false,tmp->node);
tmp->LEngineFX->setPosition(vector3df(20.0f,20.0f,60.0f));
tmp->LEngineFX->setScale(vector3df(4,4,4));
tmp->LEngineFX->setParticleSize(dimension2d<f32>(2.0f, 2.0f));
tmp->LEngineFXEmit = tmp->LEngineFX->createBoxEmitter(
aabbox3d<f32>(-2,-2,-2,2,2,2),
vector3df(0.0f,0.0f,0.1f),
400,600,
video::SColor(0,255,200,200), video::SColor(0,255,255,200),
40,60);
tmp->LEngineFX->setEmitter(tmp->LEngineFXEmit);
tmp->LEngineFXEmit->drop();
This seems like it would take more process/memory then neccessary.
Thanks for any help!