[SOLVED] Change Color of particleSystem

Hi @Gurki,

Yeah, that’s an internal API, not sure if changing the particles color on runtime is exposed on a public API.

In any case, if that works for you to change all RGB values do this:

this.entityParticleEngine.particlesystem.colorGraph.curves[0].keys[0][1] = red;
this.entityParticleEngine.particlesystem.colorGraph.curves[1].keys[0][1] = green;
this.entityParticleEngine.particlesystem.colorGraph.curves[2].keys[0][1] = blue;

And at the end I think you still need to rebuild the graph, do check this if it’s required.

1 Like