Hi This is my code
scene::IParticleSystemSceneNode* ps = 0;
ps = smgr->addParticleSystemSceneNode(false);
ps->setPosition(core::vector3df(4266,419,3809));
ps->setScale(core::vector3df(2,2,2));
ps->setParticleSize(core::dimension2d<f32>(5.0f, 5.0f));
scene::IParticleEmitter* em = ps->createBoxEmitter(
core::aabbox3d<f32>(-270,-200,-270,270,300,300),
core::vector3df(0.01f,-0.02f,0.0f),
400,800,
video::SColor(0,255,255,255), video::SColor(0,255,255,255),
1800,3000);
ps->setEmitter(em);
em->drop();
scene::IParticleAffector* paf =
ps->createGravityAffector(core::vector3df(-0.05f,-0.03f, 0.0f), 2000);
ps->addAffector(paf);
paf->drop();
ps->setMaterialFlag(video::EMF_LIGHTING, false);
ps->setMaterialTexture(0, driver->getTexture("../../media/snowparticle.bmp"));
ps->setMaterialType(video::EMT_TRANSPARENT_VERTEX_ALPHA);
the code is run properly the problem is it loads a only a part of the map so ia planned to load the top of the camera. i tried to access the its not working Waiting for replays.
createBoxEmitter box loading top of the camera
-
Radnussrini
- Posts: 14
- Joined: Tue Oct 10, 2006 5:58 am
I didn't really want a PM on this, I wanted you to post here so there could be an open discussion.
Okay, I guess. Your code snip does not have mention of any cameras, so it would be difficult to tell you what you are doing wrong. If you want one camera to be above [on top of] another camera, make a second camera that is the child of the first.The prob is I want to load camera top of a camara.
No, you loaded the box emitter at a fixed position. If you want the particle system to emit particles above the camera, even when the camera moves, you need to make the particle system a child of the camera.I try to load the box emitter to the top of the camera.
Code: Select all
ps = smgr->addParticleSystemSceneNode(false, camera);