Stopping the particles on crash or win

I also stopped the particles, but instead of just copying and pasting the commands everywhere I created the following function:

func stop_booster_particles() → void:
booster_particles.set_emitting(false)
boost_particles_left.emitting = false
boost_particles_right.emitting = false

Then in both crash_sequence(): and complete_level():
stop_booster_particles()

5 Likes

nice one cheers for sharing that :+1:

ill add that to my project as well, ive also added another line to stop the boost audio as well, as mine sometimes would keep playing.

This bugged me as well and I tried a different solution.

func stop_emitting(particle: GPUParticle3D) → void:
particle.emitting = false

Everywhere, where particles should stop emitting, I wrote
stop_emitting(variable_name) and all three after
if is_transitioning == false:

This might interfere with possible future areas we fly through, but for now it works fine.

1 Like

Privacy & Terms