I'm trying to create my particle engine, but it's not displaying, and I worked back to the code practically identical to the tutorial's:
Code: Select all
IParticleSystemSceneNode ps = smgr.AddParticleSystemSceneNode(
false, null, -10, new Vector3D(0, 0, 0), new Vector3D(), new Vector3D(2, 2, 2));
ps.ParticleSize = new Dimension2Df(40, 40);
IParticleEmitter em = ps.CreateBoxEmitter(
new Box3D(-20, 0, -20, 20, 10, 20), new Vector3D(0.0f, 0.03f, 0.0f),
80, 100,
new Irrlicht.Video.Color(0, 255, 0, 255), new Irrlicht.Video.Color(0, 255, 255, 255),
800, 2000, 0);
IParticleAffector paf =
ps.CreateFadeOutParticleAffector(new Irrlicht.Video.Color(), 1500);
ps.AddAffector(paf);
ps.SetMaterialFlag(MaterialFlag.LIGHTING, false);
ps.SetMaterialTexture(0,
driver.GetTexture("C:/Irrlicht/irrlicht-1.1/media/particle.bmp"));
ps.SetMaterialType(MaterialType.TRANSPARENT_VERTEX_ALPHA);
Thanks for any help!
Will