-
assigned issue to
Allow to reset to start particle emissions at it very moment (when the delay ends)
When a particle emitter is "started" (order it to start the emission) it first waits to it delay to end. Once it can start, it starts emitting with an emission interval (eg: 1 -> a particle each second). So, if the delay is 0 and the particle interval 1, the first time it will wait 1 second before emitting the first particle.
What if you want to emit this first particle just when it starts?
I've submitted a PR on github with the enhancement.
Comments (9)
-
repo owner -
repo owner @NemesisMate could you make a short video about this, please? I couldn't reproduce your problem :(
-
reporter I can try to make one but it is really simple. You can create a particle emitter with an emission rate of 0.5 (one every two seconds). Now click on "reset particle emitters", you'll see a delay between you click on restart and the particle is emitted so, how to make it emit the first immediately?. (to try it you can add two particle emitter inside a node, one with the given configuration and another with an emission rate of 5 (5 per second). Now "reset particle emitters" on the parent node. You'll see how this one emits immediately while the other has a delay).
This makes imposible to have a particle that spawns on scene when you trigger an event, it emits exactly 1 particle and it vanishes. Impossible because with this issue you have two problems for that approach:
- If you set an emission rate of 1 (one per second) and you give it a life of 1, the particle will never be seen (no particle will spawn).
- If you trick it with a higher life (eg: 1.05), the emission will have a delay so it won't look synced with the event.
-
repo owner @NemesisMate could you try to use the 2.3.1 version? I tried to fix it without additional fields.
-
reporter I'll give it a try. It seems that you did just the same that in the pr but without giving the optional field (so I suppose it should work just fine).
-
reporter Hm... just tried it and I think it still not work. The problem is that you missed this (line 912). When setting a new "emission per second" value, if the emitter is at it "start point" (emitted time == 0) then the currentInterval must also be reset (to it new targetInterval value). In my case, it doesn't work because of when reading the particle from file. With that fix, the reading from file is also fixed.
-
repo owner @NemesisMate can you recheck 2.3.3 version, please? :)
-
reporter Yep!, now seems to be working fine. Thanks ;)
-
repo owner - changed status to resolved
@NemesisMate cool, thanks. :)
- Log in to comment