Code: Select all
m_pParticleSystem = m_pSceneMgr->addParticleSystemSceneNode(false);
m_pParticleSystem->setPosition(core::vector3df(0, 0, 0));
m_pParticleSystem->setScale(core::vector3df(2,2,2));
m_pParticleSystem->setParticleSize(core::dimension2d<f32>(20.0f, 20.0f));
scene::IParticleEmitter* em = m_pParticleSystem->createBoxEmitter(
core::aabbox3d<f32>(-7,0,-7,7,1,7),
core::vector3df(0.0f,0.06f,0.0f),
80,100,
video::SColor(0,255,255,255), video::SColor(0,255,255,255),
800,2000);
m_pParticleSystem->setEmitter(em);
em->drop();
scene::IParticleAffector* paf =
m_pParticleSystem->createFadeOutParticleAffector();
m_pParticleSystem->addAffector(paf);
paf->drop();
m_pParticleSystem->setMaterialFlag(video::EMF_LIGHTING, false);
m_pParticleSystem->setMaterialTexture(0, m_pDriver->getTexture("resources/fire.bmp"));
m_pParticleSystem->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
Thanks