+1 vote

I have a Particle2D system, and I'd like to have the particles emit with a random alpha, but I can't seem to find a way to do this. (i.e., each particle will have a random alpha when it is emitted)

I'm looking for something like the following, but on a per-particle basis instead of something that affects the entire particle system:

extends Particles2D

var mat = self.get_process_material()

func _ready():
    randomize()

    mat.color = Color(1, 1, 1, rand_range(0, 1))
    self.set_process_material(mat)

Is this possible in Godot?

in Engine by (13 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.