← Pixel Dreamer Studio

orbit_velocity not working in 3D: use tangential_accel

A vortex or tornado for GPUParticles3D: tangential_accel turns the particles, and a negative radial_accel keeps them going around.

In our Godot 4.7 test, orbit_velocity did not turn the particles of a GPUParticles3D at all. Set tangential_accel in the ParticleProcessMaterial instead, with a negative radial_accel to pull the particles toward the emitter. With both, about two thirds of what we saw 2.2 seconds later had swung round to the other side of the emitter.

Two sets of blue light trails. On the left, straight vertical lines in a circle. On the right, a funnel of trails that turn up and out
The script below in Godot 4.7 with the Compatibility renderer, 9 frames at 30 frames a second laid on top of each other, so you can see where each particle went. Left: the same emitter with orbit_velocity 0.3 in place of the two accelerations, the particles only rise. Right: the script as written.

The code

Attach this to a GPUParticles3D. tangential_accel turns the particles around the emitter, and the negative radial_accel pulls them in, so they keep going around. gravity pointing up makes them rise.

extends GPUParticles3D
## A vortex: particles start on a ring around the emitter and spiral around it as they rise.
## orbit_velocity does not move a GPUParticles3D, so tangential_accel does the turning.


func _ready() -> void:
	amount = 120
	lifetime = 2.5
	var m := ParticleProcessMaterial.new()
	m.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_RING
	m.emission_ring_axis = Vector3.UP
	m.emission_ring_radius = 1.2
	m.emission_ring_inner_radius = 1.0
	m.emission_ring_height = 0.1
	m.initial_velocity_min = 0.0
	m.initial_velocity_max = 0.0
	m.gravity = Vector3(0, 1.5, 0)  # the rise
	m.tangential_accel_min = 1.5  # the turning
	m.tangential_accel_max = 1.5
	m.radial_accel_min = -1.0  # pulls them in, so the spiral opens slowly instead of flinging them out
	m.radial_accel_max = -1.0
	process_material = m
	var mat := StandardMaterial3D.new()
	mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
	mat.billboard_mode = BaseMaterial3D.BILLBOARD_PARTICLES
	mat.albedo_color = Color(0.55, 0.85, 1.0)
	var q := QuadMesh.new()
	q.size = Vector2(0.1, 0.1)
	q.material = mat
	draw_pass_1 = q

What we measured

We started every particle at one point beside the emitter instead of anywhere on the ring, looked down from above, and 2.2 seconds later counted the lit points on each side of the emitter. Two runs of each.

Which way it turns

A negative tangential_accel turns the particles the other way: 342 to 352 points on the other side, going round in the opposite direction. The direction also flipped when we set gravity to zero, so check it again if you change gravity.

What to change

Particles that circle a character at a fixed distance: magic aura particles. Particles that fly into a point instead: charge-up particles.

Tested in Godot 4.7 with the Compatibility renderer.

Ready-made: Xianxia VFX has Golden Core Formation, where qi spirals in and compresses into a golden core, ready for Godot 4.

More how-tos: Auras, rings, beams and weather