Particles
Part of the Game Feel section of Coddy's Godot journey. Lesson 12 of 23.
Smoke, sparks, flames and dust are made of particles. A particle node throws out many small shapes, moves each one for a while and then removes it.
The node is CPUParticles2D. The robot has one under its feet called Thruster, set up to throw amber flames downward. It starts switched off.
$Thruster.emitting = trueemitting switches it on and off. A few other properties shape the effect:
amount: how many particles are alive at oncelifetime: how many seconds each one livesdirectionandspread: where they flygravity: what pulls them
Challenge
EasyWhen the game starts, switch on the robot's Thruster and set its amount to 40 for a thicker flame.
Try it yourself
extends Node2D
func _ready():
pass
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Game Feel
Practice on your own: Godot playground