Reply To: That Lerp part makes no sense. Lerp is used to interpolate between two values. To have a fade the float argument at the en…

Forum Archive That Lerp part makes no sense. Lerp is used to interpolate between two values. To have a fade the float argument at the en… Reply To: That Lerp part makes no sense. Lerp is used to interpolate between two values. To have a fade the float argument at the en…

#25012
krystman
Participant

    If you write

    Color.Lerp(Color.white, Color.red, 1.0f);

    that’s the same as simply writing

    Color.red;

    The final parameter (1.0f) denotes the progress/position of the LERP, not the time or speed. So

    Color.Lerp(Color.white, Color.red, 0.5f);

    would return a color midway between white a red.

    If you you intended to made the color fade in that script, here is how it would work:

    http://pastebin.com/xQAfEwAR