Open JUSTCAMH opened 2 months ago
I confirm this problem
I reported something similar in #93546.
Perhaps this is related https://github.com/godotengine/godot/pull/76859#issuecomment-1769504893
❗ UPDATE: try using restart()
instead of emitting = true
(https://github.com/godotengine/godot-proposals/issues/7322)
Perhaps this is related #76859 (comment)
❗ UPDATE: try using
restart()
instead ofemitting = true
(godotengine/godot-proposals#7322)
But that comment is about how to start a particle emitter, while this issue (and #93546) is about finishing it?
Not to mention on my issue #93546 I do use restart()
and I still don't get a finished()
signal.
This is script from the MRP in this issue (sorry, I didn't look at yours):
extends GPUParticles2D
func _ready() -> void:
one_shot = true
emitting = true
finished.connect(finish)
func finish() -> void:
print("GPU Particles Destroyed!")
queue_free()
After adding restart()
in _ready()
function signal will be emitted.
IMHO he problem lies in the fact that the one_shot
value is changed when the emitter is already added to the scene tree and has an active emitting
state.
If signal_canceled
is set, signal will not be emitted.
Tested versions
System information
Godot v4.3.beta2 - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.3619) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)
Issue description
When setting oneshot to true on a GPUParticles2D node, the particles visually stop emitting some time later as expected, however the 'finished' signal is not emitted. This does not occur with CPUParticles2D. I have not tested this for 3D particles, but I presume that this also applies to the GPUParticles3D.
Steps to reproduce
Minimal reproduction project (MRP)
particles-finished-bug.zip