Particle system invisible

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
benoit808
Posts: 8
Joined: Fri Oct 06, 2006 6:47 pm

Particle system invisible

Post by benoit808 »

I set a particle system but it doesn't appear in my scene. I tried to play with all the parameters but nothing works. I tried to write my own code as well as using code from the Tutorial and other posts in that forum. The code I have right now is:

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);
I know that the texture is loading correctly and I don't get any error message. Any idea what could be going on?

Thanks
Post Reply