Example 8 - wrong fire?
Posted: Sat Aug 19, 2006 2:31 pm
I noticed, if I start Example 8 from the irrlicht examples that, when the fire emitter starts to work, it emits a strange "puff" in the beginning. I mean, if you start the example and as soon as it loads, you press LEFT (to sse the fire behind the dwarf), you will notice, that the emitter doesn't emit the particles continously. First, it emits a sort of fire ball, after it works fine.
I copied the emitter code into my code and saw, that if I write:
the first fire particle will go upwards alone (maybe there are a lot of particles on each other's top, cannot see it well). As it moves upwards, the "real" emitter will start to work and it works fine.
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?
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?