Particles not rotating w/ world and one other thing

For now I’m not using particles in my galaxy generation, but I used to and noticed that behavior back then. It didn’t feel odd at that time but now I’m realizing it might be a problem.



When I used to set a particle (smoke) around a star and the galaxy was slowly rotating, the particle would drift off the center of the sun it was attached to, giving the effect of trailing smoke. I’m wondering if particle emitters are acting the way chase cameras were before they were fixed or if it was me doing something wrong.



As I said, I’m not using those emitters right now, but I do plan on adding some later on in the development. I am also wondering if a particle would rotate around a rotating brush or model (like a light particle attached to a rotating radar dish for example), and leave a trail as what it is attached to rotates.



Also I noticed there wasn’t a way to set a particle to have an infinite lifetime. From what I have read, all particles have to be given a LowLife and a HighLife. Would it be possible to use -1 (or a new method maybe?) that would say: this particle last forever?



An example of this would be a red light particle sitting on top of an antenna. It could be setup as a simple light sitting there.



As usual it’s possible it’s me who’s doing something wrong.

madjack said:
When I used to set a particle (smoke) around a star and the galaxy was slowly rotating, the particle would drift off the center of the sun it was attached to, giving the effect of trailing smoke. I’m wondering if particle emitters are acting the way chase cameras were before they were fixed or if it was me doing something wrong.

This is considered a feature of the particle emitter, any particles emitted will remain in the same world location after emission without being effected by the world transform of the particle emitter. You can disable this feature by calling ParticleEmitter.setInWorldSpace(false).

madjack said:
As I said, I’m not using those emitters right now, but I do plan on adding some later on in the development. I am also wondering if a particle would rotate around a rotating brush or model (like a light particle attached to a rotating radar dish for example), and leave a trail as what it is attached to rotates.

If the particle emits in world space, then yes. See answer above.

madjack said:
Also I noticed there wasn’t a way to set a particle to have an infinite lifetime. From what I have read, all particles have to be given a LowLife and a HighLife. Would it be possible to use -1 (or a new method maybe?) that would say: this particle last forever?

An example of this would be a red light particle sitting on top of an antenna. It could be setup as a simple light sitting there.

This is a good suggestion in general, but I don't think your example is a good one. If you just want a simple glow sprite effect, you can use a billboarded node for that. An alternative way would be to use ParticleEmitter.setEnabled(false), this would disable the updates of the particle emitter, essentially freezing all particles in space, and it will also significantly improve performance since the particles don't have to be updated every frame.
Momoko_Fan said:
This is considered a feature of the particle emitter, any particles emitted will remain in the same world location after emission without being effected by the world transform of the particle emitter. You can disable this feature by calling ParticleEmitter.setInWorldSpace(false).

If the particle emits in world space, then yes. See answer above.

Noted.


This is a good suggestion in general, but I don't think your example is a good one. If you just want a simple glow sprite effect, you can use a billboarded node for that. An alternative way would be to use ParticleEmitter.setEnabled(false), this would disable the updates of the particle emitter, essentially freezing all particles in space, and it will also significantly improve performance since the particles don't have to be updated every frame.


Wrong example, but it's the first that popped up. :)

If it's setEnabled(false) at start I imagine it wouldn't render at all, so for how long should it be enabled, so it can render a bit, before turning it off?

I see what you mean, if you’re using emitAllParticles(), you just need 1 frame of it being enabled for all needed updates to occur.

Alright. Thanks for the info. I’ll look that post up when I’ll get back to implement some eye candy.