---
title: "One-shot explosion with GPUParticles3D in Godot 4"
description: "Turn on One Shot, set Explosiveness to 1, spawn the scene, set emitting and free it on the finished signal. Steps and GDScript for Godot 4."
canonical: https://appliedmanifold.com/guides/godot-one-shot-explosion/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [Guides](https://appliedmanifold.com/guides/)
3.  One-shot explosion

GUIDE // GODOT 4

# How to make a one-shot explosion with GPUParticles3D in Godot 4

Turn on One Shot and set Explosiveness to 1 on a GPUParticles3D, so every particle spawns at once and the emitter stops after one cycle. Spawn your scene where the blast happens, set emitting to true, and connect its finished signal to queue\_free so the node removes itself when the last particle dies.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [See the examples →](https://appliedmanifold.com/docs/pyrofx/examples/)

-   **Godot 4** Available
-   Unity Manual setup
-   Unreal Engine Manual setup
-   Roblox Studio Manual setup
-   three.js Available

A draft compile is from $0.05, and new accounts start with $5 of usage.

**FIREBALLFINAL**

![First frame of the fireball bake](/bakes/fireball/poster.webp)

Fireball, 9.4 x 13.4 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-fireball)

01 // HOW TO

## Build the explosion scene

1.  Create a new scene with a `GPUParticles3D` as its root and save it as `explosion.tscn`.
2.  Turn on One Shot, set Explosiveness to 1 and set Lifetime to the length of your explosion sheet.
3.  Set Animation Speed to 1 in the process material and leave Particles Anim > Loop off in the draw material, so the sheet plays once and holds its last, empty frame.
4.  Leave Emitting off in the saved scene. The spawning script turns it on.
5.  Spawn it from your own code with `spawner.gd`.

spawner.gd

```
extends Node3D

const EXPLOSION := preload("res://fx/explosion.tscn")

func spawn_explosion(pos: Vector3) -> void:
	var fx: GPUParticles3D = EXPLOSION.instantiate()
	get_tree().current_scene.add_child(fx)
	fx.global_position = pos
	fx.finished.connect(fx.queue_free)
	fx.emitting = true
```

`finished` fires only on a one-shot emitter, once the last particle has died, so the node never lingers.

02 // WITH SPATIAL COMPILER

## An explosion that ends on its own

Ask your agent for a fireball or an impact. A one-shot compile ends when the effect has faded, so the last frame is empty and nothing pops off. In Godot 4 your agent drops it into a scene as a quad sized in meters with its origin on the ground, so you place it at the point of impact.

The wired scene plays when it enters the tree. To free it, start a timer for the clip length that `layout.json` records, or ask for `node=particles` to get a `GPUParticles3D` and free it with `finished` as in Build the explosion scene.

spawn\_fireball.gd

```
# life_s: the clip length from the bake's layout.json
func spawn_effect(scene: PackedScene, pos: Vector3, life_s: float) -> void:
	var fx: Node3D = scene.instantiate()
	get_tree().current_scene.add_child(fx)
	fx.global_position = pos
	get_tree().create_timer(life_s).timeout.connect(fx.queue_free)
```

03 // REAL OUTPUT

## One-shot compiles

The fireball plays for 3.7 seconds and the impact for 2.0 seconds, each in 64 frames.

**IMPACTFINAL**

![First frame of the impact bake](/bakes/impact/poster.webp)

Impact, 3.5 x 2.8 m, compiled with Spatial Compiler. [Spec →](https://appliedmanifold.com/docs/pyrofx/examples/#ex-impact)

04 // RELATED

## Related pages

-   [Godot fireball Godot 4A fireball that bursts from the ground and rolls upward in 3.7 seconds, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-fireball/)
-   [Godot explosion Godot 4An explosion that plays once, a ground fireball or a shell impact, dropped into a Godot 4 scene by your agent.](https://appliedmanifold.com/effects/godot-explosion/)
-   [Loop vs one-shotLooping effects repeat until stopped and one-shot effects play once and fade out, and each needs its own frames and settings.](https://appliedmanifold.com/learn/loop-vs-one-shot/)
-   [Explosion sound and shake Godot 4Fire an explosion, its 3D sound and a decaying camera shake together in Godot 4, with the sound delayed by distance.](https://appliedmanifold.com/guides/godot-explosion-sound-shake/)
-   [Play an explosion once UnityMake a Unity Particle System play an explosion flipbook a single time and destroy itself, with a prefab and a spawn script.](https://appliedmanifold.com/guides/unity-play-explosion-once/)
-   [Play an explosion once Unreal EngineMake a Niagara emitter play an explosion flipbook a single time and clean itself up, with an optional hold on the last frame.](https://appliedmanifold.com/guides/unreal-explosion-play-once/)
-   [Bake and wireCall `bake` with a `.pyro.toml` spec and an output folder, then `wire` to write a Godot 4 scene with the six-way shader. `check`, `schema` and `sweep` support the loop.](https://appliedmanifold.com/docs/pyrofx/bake-and-wire/)

[All pages in Guides →](https://appliedmanifold.com/guides/)

[← Smoke and scene lighting](https://appliedmanifold.com/guides/godot-smoke-scene-lighting/)[Dust puff on landing →](https://appliedmanifold.com/guides/godot-dust-landing-effect/)

05 // FAQ

## One-shot explosion questions

[All questions →](https://appliedmanifold.com/faq/)

**README.GODOT\_ONE\_SHOT\_EXPLOSION**

### How do I make a single burst explosion with GPUParticles3D in Godot?

Turn on One Shot and set Explosiveness to 1, then set emitting to true when the blast happens or call restart() to replay.

### How do I trigger an explosion and remove the particle node afterward in Godot?

Connect the emitter finished signal to queue\_free before setting emitting to true so the node frees itself after the last particle dies.

### How do I make an explosion expand quickly and fade out smoothly?

Use high Initial Velocity with strong Damping, a Scale Curve that rises steeply at the start and a Color Ramp ending at zero alpha.

### How do I layer explosion particles in Godot?

Start two One Shot emitters on the same frame: one with a few large fireball cards and a second with many small debris particles.

## Compile your first effect

You pay per compile and see the price before it runs. New accounts start with $5 of usage.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [Bake and wire →](https://appliedmanifold.com/docs/pyrofx/bake-and-wire/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
