2D particle emitter.
    public class Particles2D : Node2D

2D particle node used to create a variety of particle systems and effects. Particles2D features an emitter that generates some number of particles at a given rate.

Use the process_material property to add a ParticlesMaterial to configure particle appearance and behavior. Alternatively, you can add a ShaderMaterial which will be applied to all particles.

Inheritance Chain


    public Particles2D()


    public int Amount { get; set; }

Number of particles emitted in one emission cycle.

    public DrawOrderEnum DrawOrder { get; set; }

Particle draw order. Uses DRAW_ORDER_* values. Default value: DRAW_ORDER_INDEX.

    public bool Emitting { get; set; }

If true, particles are being emitted. Default value: true.

    public float Explosiveness { get; set; }

How rapidly particles in an emission cycle are emitted. If greater than 0, there will be a gap in emissions before the next cycle begins. Default value: 0.

    public int FixedFps { get; set; }

The particle system’s frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself.

    public bool FractDelta { get; set; }

If true, results in fractional delta calculation which has a smoother particles display effect. Default value: true

    public float Lifetime { get; set; }

Amount of time each particle will exist. Default value: 1.

    public bool LocalCoords { get; set; }

If true, particles use the parent node’s coordinate space. If false, they use global coordinates. Default value: true.

    public Texture NormalMap { get; set; }

Normal map to be used for the texture property.

    public bool OneShot { get; set; }

If true, only one emission cycle occurs. If set true during a cycle, emission will stop at the cycle’s end. Default value: false.

    public float Preprocess { get; set; }

Particle system starts as if it had already run for this many seconds.

    public Material ProcessMaterial { get; set; }

Material for processing particles. Can be a ParticlesMaterial or a ShaderMaterial.

    public float Randomness { get; set; }

Emission lifetime randomness ratio. Default value: 0.

    public float SpeedScale { get; set; }

Particle system’s running speed scaling ratio. Default value: 1. A value of 0 can be used to pause the particles.

    public Texture Texture { get; set; }

Particle texture. If null particles will be squares.

    public Rect2 VisibilityRect { get; set; }

Editor visibility helper.


    public Rect2 CaptureRect()

Returns a rectangle containing the positions of all existing particles.

    public int GetAmount()

Getter for Amount

    public DrawOrderEnum GetDrawOrder()

Getter for DrawOrder

    public float GetExplosivenessRatio()

Getter for Explosiveness

    public int GetFixedFps()

Getter for FixedFps

    public bool GetFractionalDelta()

Getter for FractDelta

    public float GetLifetime()

Getter for DrawOrderEnum.Lifetime

    public Texture GetNormalMap()

Getter for NormalMap

    public bool GetOneShot()

Getter for OneShot

    public float GetPreProcessTime()

Getter for Preprocess

    public Material GetProcessMaterial()

Getter for ProcessMaterial

    public float GetRandomnessRatio()

Getter for Randomness

    public float GetSpeedScale()

Getter for SpeedScale

    public Texture GetTexture()

Getter for Texture

    public bool GetUseLocalCoordinates()

Getter for LocalCoords

    public Rect2 GetVisibilityRect()

Getter for VisibilityRect

    public bool IsEmitting()

Getter for Emitting

    public void Restart()

Restarts all the existing particles.

    public void SetAmount(int amount)

Setter for Amount

    public void SetDrawOrder(DrawOrderEnum order)

Setter for DrawOrder

    public void SetEmitting(bool emitting)

Setter for Emitting

    public void SetExplosivenessRatio(float ratio)

Setter for Explosiveness

    public void SetFixedFps(int fps)

Setter for FixedFps

    public void SetFractionalDelta(bool enable)

Setter for FractDelta

    public void SetLifetime(float secs)

Setter for DrawOrderEnum.Lifetime

    public void SetNormalMap(Texture texture)

Setter for NormalMap

    public void SetOneShot(bool secs)

Setter for OneShot

    public void SetPreProcessTime(float secs)

Setter for Preprocess

    public void SetProcessMaterial(Material material)

Setter for ProcessMaterial

    public void SetRandomnessRatio(float ratio)

Setter for Randomness

    public void SetSpeedScale(float scale)

Setter for SpeedScale

    public void SetTexture(Texture texture)

Setter for Texture

    public void SetUseLocalCoordinates(bool enable)

Setter for LocalCoords

    public void SetVisibilityRect(Rect2 visibilityRect)

Setter for VisibilityRect

Inner Types


Name Value Description
Index 0 Particles are drawn in the order emitted.
Lifetime 1 Particles are drawn in order of remaining lifetime.