2 questions for that
1) are the positions of the pixels relative to the node of the emission, so that the rocket would always have a "stick" of prixel behind it when it turns. that would not look realistic. or are the positions of the pixels at the moment theiy are emitted not relative to the emmitting node anymore so i can get a effekt like "writing stuff into the air" like you can do with colord smoke from plains or fireworks.what methode is used to change between theese styles, if thats possible
2) what is a good way to turn an partikelsyste "soft" off. if my rockets dies, because of age i simply remove the mesh and nodes for now.
Code: Select all
if (mfAge < mfRuntime)// this. is aging
{
if(mActive == true)
{
mfAge += timeSinceLastFrame;// as long as we are processing this, the projectile is still alive
// move the projectile forward
Vector3 vec;
vec = Vector3::ZERO;
vec.z = mfSpeed * timeSinceLastFrame;
Vector3 trans = mProjectileNode->getOrientation() * vec;
mProjectileNode->translate(trans);
}
}
else// this. has to die now, its to old.
{
// the last one turns off the light ...
mSceneMgr->removeLight(mEngineLightName.str());
ParticleSystemManager::getSingleton().destroySystem(mpSysEngine);
mProjectileNode->detachObject(mProjectile);// vanish !
mProjectileNode->removeChild (mEngineEffectsNode);
mSceneMgr->getRootSceneNode()->removeChild (mProjectileNode);
// reset
mActive = false;
mfAge = 0;
}
1 rocket is fliing
2 -wait until it has to die because of age-
3 rockets mesh is removed, the movement is stopped,the partikelsystem does not emitt any further partikels
4 -wait until all partikels have disappeared
5 completly remoce the partikelsystem and all the nodes belonging to the rocket
what i got sofar is step 1,2,5
how to get the maximum time the partikels of the system would "survive" if i turn it off now (apart from looking into the skriptfile direct).
and how to tell the system to stop to emitt partiekls now