Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
GPUParticles2D¶
Inherits: Node2D < CanvasItem < Node < Object
A 2D particle emitter.
Description¶
2D particle node used to create a variety of particle systems and effects. GPUParticles2D features an emitter that generates some number of particles at a given rate.
Use the process_material property to add a ParticleProcessMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles.
2D particles can optionally collide with LightOccluder2D, but they don't collide with PhysicsBody2D nodes.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
capture_rect ( ) const |
|
void |
convert_from_particles ( Node particles ) |
void |
emit_particle ( Transform2D xform, Vector2 velocity, Color color, Color custom, int flags ) |
void |
restart ( ) |
Signals¶
finished ( )
Emitted when all active particles have finished processing. When one_shot is disabled, particles will process continuously, so this is never emitted.
Note: Due to the particles being computed on the GPU there might be a delay before the signal gets emitted.
Enumerations¶
enum DrawOrder:
DrawOrder DRAW_ORDER_INDEX = 0
Particles are drawn in the order emitted.
DrawOrder DRAW_ORDER_LIFETIME = 1
Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
DrawOrder DRAW_ORDER_REVERSE_LIFETIME =