I copied the emitter code into my code and saw, that if I write:
Code: Select all
scene::IParticleSystemSceneNode* ps = 0;
ps = scene->addParticleSystemSceneNode(false);
ps->setPosition(core::vector3df(80,0,-150));
ps->setScale(core::vector3df(2,2,2));
ps->setParticleSize(core::dimension2d<f32>(20.0f, 20.0f));
IParticleEmitter* em = ps->createBoxEmitter(
core::aabbox3d<f32>(-7,0,-7,7,1,7),
core::vector3df(0.0f,0.06f,0.0f),
10,100,
video::SColor(0,255,255,255), video::SColor(0,255,255,255),
600,1000);
ps->setEmitter(em);
em->drop();
scene::IParticleAffector* paf =
ps->createFadeOutParticleAffector();
ps->addAffector(paf);
paf->drop();
ps->setMaterialFlag(video::EMF_LIGHTING, false);
ps->setMaterialTexture(0, video->getTexture("fire.bmp"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
http://www.kokany.atw.hu/irr/xxx.jpg
Is this a bug in the engine, or the example is missing something?
Do emitters need timers to work correctly?