Particle engine not displaying

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
Will Piovano
Posts: 22
Joined: Sun Oct 15, 2006 10:02 pm

Particle engine not displaying

Post by Will Piovano »

Hey all,

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);
Do you see anything wrong with that? The whole thing runs, but the pe is nowhere to be seen...

Thanks for any help!

Will
Hurley451
Posts: 3
Joined: Wed Dec 06, 2006 4:31 am

Post by Hurley451 »

Check your camera. I ran into this as well the first day I messed around with Irrlicht (admittedly this was yesterday). When creating a FPS styled camera the particle emiter/node is visible, when creating a non-FPS camera it does not appear.

I'm not sure what is causing it yet, or what I'm failing to do, as I'm sure there's some extra initialization within the FPS style method. I'll let you know if I find out.
Locked