Explosions automatically parent themselves to nil
after a short period of time. This period of time is intended to allow the VFX to play out, but the timer formula does not correctly account for all properties. This results in the explosion particles disappearing before they have a chance to play out, depending on the configuration of the explosion.
Based on my tests, the delay time t
seems to only vary with BlastRadius
r
according to the formula:
r < 1: t = 3
r >=1: t = 3 - 1/r
Here’s the results of my test on a scatter plot, where the noisy values above the line could be attributed to the scheduler not resuming that task immediately:
I’m unsure what the correlation between BlastRadius
and delay
should be, but I’m guessing the particles expand at a constant velocity, so a larger Radius means it needs more time to expand.
But there’s another important property not being factored in: TimeScale
. According to the documentation,
This is a value between 0-1 than controls the speed of the particle effect. At 1 it runs at normal speed, at 0.5 it runs at half speed, and at 0 it freezes time.
So that has a very direct effect on the delay needed before unparenting the explosion in order to let the particles play out, but is not currently taken into consideration.
There may be other properties that also affect the required delay that should be taken into consideration.
Expected behavior
Explosions should not unparent themselves until the particle VFX have finished playing, regardless of TimeScale, BlastRadius, or any other property. It should allow for particles to visually play out and disappear completely.