Skip to content

Instantly share code, notes, and snippets.

@QueenOfSquiggles
Created September 22, 2023 20:40
Show Gist options
  • Save QueenOfSquiggles/63ea652b4eb35fe0c73ac272a9341765 to your computer and use it in GitHub Desktop.
Save QueenOfSquiggles/63ea652b4eb35fe0c73ac272a9341765 to your computer and use it in GitHub Desktop.
Godot GPU Particles Oneshot hack for VFX
extends GPUParticles3D
##
## This class should probably be part of the engine featureset. In the meantime, we can have a global class to provide this feature set. Eventually if I have the time I could look at the engine code and see how hard of a feat adding this feature would be.
##
class_name VFXParticlesGPU
func _ready() -> void:
emitting = true
one_shot = true
func _process(delta : float) -> void:
if not emitting:
queue_free()
@QueenOfSquiggles
Copy link
Author

Licensing for this is gonna be MIT/CC0 or whatever means that you can use this for literally whatever you want, as long as I'm not liable for your actions with it. That's my general approach with gists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment