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…

#25014
krystman
Participant

    Are you sure you are familiar with how that function works? There is no “effect”. There is no animation. You just change the color instantly to a different one. The way it is set up the you can’t make the transition gradual. The Lerp is completely superfluous. I don’t understand why you have it there. I haven’t seen the entire flow yet. Perhaps you do something with the Lerp later?

    I think you should have left the Lerp out and written

    crosshair.color = Color.white;

    and

    crosshair.color = Color.red;

    You do that below at the else part so you seem to be aware that this works.

    I worried the way it is right now is unnecessarily obtuse and misleading for newcomers.