Page 1 of 1
ParticleSystem and setColor
Posted: Sun Feb 05, 2017 1:30 am
by splats
Hi, love2d newbie here, I've noticed something peculiar with the ParticleSystem - if I have love.graphics.setColor(color) for say drawing a shape, then draw my particleSystem object afterwards, the particles will always have the color from the previous setColor, ignoring whatever is set by ParticleSystem:setColors initially (I'd expect it to be the interpolated color). Is this a bug or am I missing something..
Re: ParticleSystem and setColor
Posted: Sun Feb 05, 2017 2:03 am
by veethree
Set the color back to white before drawing the particle system.
Re: ParticleSystem and setColor
Posted: Sun Feb 05, 2017 2:05 am
by splats
Thanks!
Re: ParticleSystem and setColor
Posted: Sun Feb 05, 2017 2:09 am
by slime
Just a clarification, the global constant color and the per-particle colors get multiplied (modulated) together when the particle system is drawn – so neither overwrites the other, but if you don't want a custom constant color then you'll still need to set it to the default white when drawing.