Slowly showing a low lying fog by animating position of emitter

Based of this awesome answer I am trying to get a low lying fog to smoothly move up above the ground. I can’t yet get it to move with the emitter and I suspect it’s a complex intersection of settings like emitBox, minLifeTime, etc: :grin:

If you disable the particleSystem.manualEmitCount and the particleSystem.minLifeTime then it “works” but not smoothly:

Of course I am open to other ways of achieving this, such as animating the opacity / visibility of the fog :slightly_smiling_face:

1 Like

Hi! What about having a positive gravity? Low Lying Fog | Babylon.js Playground ( :slight_smile:

Nice idea! I tried putting a setTimeout that, after a second, sets the gravity to 0. But it looks like the particles still have some momentum as shown by this:

I’ve also tried expertimenting with particleSystem.reset and particleSystem.rebuild but can’t get them to work.

It’s a bit hacky but this is a first pass that both moves the fog upwards and increases it’s opacity using a custom updateFunction:

NOTE: this does not seem to work for GPUParticleSystem. Which makes sense.

1 Like