Turn the smoke on from the wheel's sideways speed, the part of its velocity along the car's x axis, not from how fast the car goes. In our Godot 4.7 test a rule of smoke above 10 m/s was on 100% of the time driving straight at 20 m/s and in an ordinary 20 m corner. The script below stayed off in both and came on in a 30 degree slide, where the rear wheel moved sideways at 6.6 m/s.
The code
Add this node to the car at a rear wheel, one per wheel if you like, and set smoke to your GPUParticles3D. It works out the wheel's velocity from how far the node moved since the last physics frame, so it does not matter which car controller you use.
extends Node3D
## Turns tire smoke on only while the wheel slides sideways, not just because the car is fast.
## Add it to the car at a rear wheel and set "smoke" to your GPUParticles3D.
## It measures the wheel's own movement, so it works with VehicleBody3D or any car controller.
@export var smoke: GPUParticles3D
@export var slip_on := 3.0 ## sideways speed in m/s that starts the smoke
@export var slip_off := 1.5 ## below this it stops. Lower than slip_on, so it does not flicker
var slip := 0.0 ## the wheel's sideways speed now, in m/s
var _last := Vector3.ZERO
func _ready() -> void:
_last = global_position
func _physics_process(delta: float) -> void:
var v := (global_position - _last) / delta
_last = global_position
slip = absf(v.dot(global_basis.x.normalized())) # the part of the wheel's speed that goes sideways
if smoke.emitting and slip < slip_off:
smoke.emitting = false
elif not smoke.emitting and slip > slip_on:
smoke.emitting = true
What we measured
A car moved by script every physics frame, with the node at the rear right wheel, 0.8 m to the side and 1.2 m back from the middle.
- Straight at 20 m/s: 0.00 m/s sideways. Script off. Speed rule on 100% of the time.
- A 20 m corner at 15 m/s with the car pointing along its path: the rear wheel moved 0.90 m/s sideways, because the car turns around its middle. Script off. Speed rule on 100%.
- Sideways speed wobbling between 2.6 and 3.4 m/s five times a second, for 2 seconds: a single level of 3 m/s switched the smoke on or off 21 times. The script switched it on once and kept it on.
- A drift with the car pointing 30 degrees off its path at 15 m/s: 6.60 m/s sideways. Script on 100%.
Two runs gave the same numbers.
Why speed is the wrong signal
Tire smoke comes from rubber sliding over the road. A fast car on a straight or in a clean corner is not sliding, so its wheels hardly move sideways. The sideways part of the wheel's velocity is the slide itself. Two levels, a higher one to start and a lower one to stop, keep a slide that hovers near one value from switching the emitter every few frames.
What to change
slip_onandslip_off: raise both for a grippy sports car, lower them for a kart on ice.slipholds the sideways speed, so you can use it to start skid marks at the same moment or to play a tire squeal.
Ready-made racing effects: Racing & Kart VFX for Godot 4 has 28 presets in Stylized and Retro PSX looks, including Drift Smoke for tires, dust and snow, mini-turbo Drift Sparks, Nitro flames and Backfire, plus skid marks drawn as a ribbon on the ground.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: Racing & Kart VFX for Godot 4 has 28 ready-made racing effects in Stylized and Retro PSX looks, including Drift Smoke, mini-turbo Drift Sparks, Nitro and Backfire, plus skid marks drawn as a ribbon on the ground.
More how-tos for Racing & Kart VFX for Godot 4: Count a lap only when the car really went round · A ghost that drives the lap at real speed
More how-tos: Play, stop and remove effects
- An aura that comes back when the buff comes back
- A spawned effect that appears exactly where you hit
- Draw the hit effect over what it hit
- Remove a one-shot particle effect when it ends
- Fade out and stop looping particles
- Spawn a hit effect facing the surface
- Hit sparks from a pool of emitters
- Changing one particle effect's color changes all of them
- Particles that play the same way every time
- Freeze particles in mid-air
- Running dust and landing puffs
- Particles left behind by a moving object
- 2D particles follow the player or stay behind
- Footstep particles that match the ground
- A level up effect that plays while paused
- Hide particle effects far from the camera
- Death particles disappear when the enemy is freed
- Remove all particles at once
- Play a 2D sprite sheet effect once and remove it, even if its animation loops
- Sprite sheet frames without the empty cells
- Sprite sheet frames without lines from the next cell