Question by
SynGameDev · May 31, 2020 at 03:09 AM ·
color.lerp
Alpha Changing on color lerp
Hi,
I'm trying to lerp to color a to b. when the color lerps, it sets the alpha to 0 so the sprite can no longer be seen.
Is there a way around it?
_AngelReviveLevel -= 1 * (_DrainTime * Time.deltaTime);
var LerpValue = _AngelReviveLevel / 100; // Set the value between 0 & 1
Color LerpedColor = Color.Lerp(_StatEmptyColor, _StatFullColor, LerpValue);
// Set the body color
_Body.color = LerpedColor;
_Glow.color = LerpedColor;
Comment