particle system slower

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
d00d
Posts: 7
Joined: Tue Jan 23, 2007 7:07 pm

particle system slower

Post by d00d »

in advance, sorry for probable repost, but ive done some searching and still havent found a solution. its probley really simple, but nothing happens when i try to make a particle system.
here is the code for when i shoot.

Code: Select all

bill2.setVisible(true);
bill2.setPosition(intersection);
IParticleSystemSceneNode parts = smgr.addParticleSystemSceneNode(false);
parts.setPosition(bill2.getPosition());
parts.setParticleSize(new dimension2df(30,30));
IParticleEmitter emit = parts.createPointEmitter(camera.getRotation().timesOperator(-1f), 20, 50, new SColor(0, 225,0,0), new SColor(0, 0,225,0), 10, 20 );
parts.setEmitter(emit);
woah, scratch that it was just going REALLY fast, is there a way to slow down the speed that particles get emitted at? (like, not particles/second but in terms of initial velocity)
Last edited by d00d on Sat Feb 03, 2007 4:39 am, edited 1 time in total.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

The first thing jumps out at me is that the colors you are using are completely transparent. You might try passing a 255 as the first value to SColor.
d00d
Posts: 7
Joined: Tue Jan 23, 2007 7:07 pm

Post by d00d »

:oops: :oops: yea, i figured that out
but edit above.. how to slow things down?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

you're passing a rotation in euler angles rather than a direction in distance-per-milisec. try passing this instead:
(camera->getTarget() - camera->getAbsolutePosition()).normalize() * -0.01f
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply