Game Development Community

Particle lifespans

by Tim Doty · in Torque Game Builder · 04/10/2005 (2:42 pm) · 8 replies

I've got several particle effects done and rather like the system, but I've got a problem with one of them, the particles go away too fast. The effect has four emitters, three of which have fairly short particle life spans. The fourth is a "trail" of sorts with a particle lifetime of around 10 seconds.

In the editor everything looks fine, but when I attach the effect to an object in the game the trail doesn't hang around, particles just last a fraction of a second.

edit: actually, that's not quite the case. Meaning, the emitter is mounted to another object, in this case a missile. If I change the mount to not be owned then the emitter survives the destruction of the missile and at that point will sit motionless and slowly put out a column of smoke. Yes, the missile moves fast but just in case the particles were inheriting its speed I gave them an exit velocity equal to that of the missile. This did not noticably alter the behavior.

Any ideas?

#1
04/11/2005 (4:40 am)
When T2D automatically destroys an effect, it will stop emitting particles but will wait until all particles have died naturally. This is the default if T2D deletes it via something like a mount-ownership. You would want this as the alternative is seeing all the particles disappear instantly.

You have the option to destroy the effect immediately if you want by using "stopEffect(false, true);" but obviously all the particles disappear instantly.

In all cases, the effect will not emit any more particles.

- Melv.
#2
04/11/2005 (8:09 am)
The not emitting is fine and what I expected. What I don't understand is why the trail of already emitted particles doesn't hang around. I'm sure the effect is operating according to its parameters, but I can't seem to figure out what I'm doing wrong in trying to get the effect I want.

I'm going to try mounting the effect to a different (slower moving) in game object and see what happens.
#3
04/11/2005 (10:29 am)
Hmmm, particles should die naturally and the effect should wait. They have in every case I've ever used.

If you've got an example effect for me (and the relevant files) I could look at it, maybe it's a bug.

- Melv.
#4
04/11/2005 (12:26 pm)
I really appreciate the offer. I finally did figure it out though and it was a combination of three things: particle generation rate, particle size and particle visibility -- put on a quick moving in-game object.

I do have a recommendation (if this isn't already in the plans or the current particle effect editor): the ability to apply a velocity and/or force to the displayed emitter like we already can for rotation. The camera should be mounted to the emitter so it doesn't run off the screen, but this would allow much easier testing.

Not only would it have shown very quickly what was wrong with my effect it would make designing effects intended to be moving much easier (there's one I've designed which really doesn't come into its own until displayed at speed).

Just a thought
#5
04/12/2005 (1:34 am)
@Tim: Click in the display. You can pick-up the effect and move it around. This is the same as moving it and gives you more control.

- Melv.
#6
04/12/2005 (5:47 am)
@Melv: I respectfully disagree. Being able to assign an arbitrary velocity vector is something you don't get by moving with a mouse. They are related but are still different controls.

Being able to move with the mouse is useful and helpful, but IMO being able to assign an arbitrary velocity vector would be a useful and helpful addition.
#7
04/12/2005 (6:44 am)
Well Tim, I respectfully say that I'm not going to get around to that for a while, too much to do. ;)

- Melv.
#8
04/12/2005 (9:41 am)
Quite understood. It is only a suggestion in any case. I truly hope that it was clear that 1) I thought it useful, 2) why I thought it useful, 3) I'm not trying to order anyone around. I wouldn't dream of trying to prioritize your time.

Take care and thanks for all the outstanding support.