← Pixel Dreamer Studio

Gaps in the trail of a fast emitter

New particles are placed once per update. Update every frame with fixed_fps 0.

A GPUParticles3D places its new particles once per update, and it updates fixed_fps times a second, 30 by default. A fast emitter moves a long way between updates, so it leaves clumps with gaps between them. In our Godot 4.7 test, an emitter moving at 9 m/s left 25 clumps across the screen at the default and 49 with fixed_fps = 0, which updates every frame. Doubling amount changed nothing: still 25.

Two dotted lines. The top one has wide gaps between the dots, the bottom one has about twice as many dots
Godot 4.7 with the Compatibility renderer at 60 frames a second, enlarged 2 times. Two emitters moved left to right at 9 m/s. Top: fixed_fps 30, the default. Bottom: the script, with lifetime 2 so the whole trail is still there.

The code

Attach this to a GPUParticles3D under the moving node, such as a rocket. fixed_fps = 0 is the fix.

extends GPUParticles3D
## A trail for something fast, like a rocket or a dash. Make this a child of the moving node.
## New particles are placed once per update: at the default fixed_fps of 30, a fast mover leaves clumps with gaps.


func _ready() -> void:
	fixed_fps = 0  # the fix: update every frame, so the trail is placed every frame
	amount = 200
	lifetime = 1.0
	var m := ParticleProcessMaterial.new()
	m.initial_velocity_min = 0.0  # each particle stays where it was placed
	m.initial_velocity_max = 0.0
	m.gravity = Vector3.ZERO
	process_material = m
	var mat := StandardMaterial3D.new()
	mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
	mat.billboard_mode = BaseMaterial3D.BILLBOARD_PARTICLES
	mat.albedo_color = Color(1, 0.8, 0.45)
	var q := QuadMesh.new()
	q.size = Vector2(0.06, 0.06)
	q.material = mat
	draw_pass_1 = q

What we measured

The emitter moved 9 m across the screen in 1 second, at about 60 frames a second. Along the line it left, we counted the clumps of particles and the widest gap between two clumps. Two runs of each.

Closing the last gaps

At 60 frames a second, an emitter moving at 9 m/s travels 0.15 m every frame. Make the particles larger than that and they touch. For long, thin streaks instead of dots: particle trails in the Compatibility renderer.

What to change

fixed_fps also decides how smoothly particles move: choppy particles.

Tested in Godot 4.7 with the Compatibility renderer.

More how-tos: Projectiles and aiming