nice work. can you think of a way to do a change over time between several colors? not only 2? im thinking about something like in the particles engine.
good question! are you looking to modify the current script from this video? if you are referring to the particles system, what you could do is use 'Color over Lifetime' and have several color keys, using 'Blend'.
@@jonbednez no. i want to use the same method for another object. lets imagine you want to change between 10 colors according to some conditions. and not to create a fade between original color and a second one, as you did in the video.
@@ShacharOz the method being Color.Lerp? like I click an object, lerp to red. when I reach a trigger, lerp to yellow. this random condition, lerp to another color, etc. OR lerp from yellow to red to orange to whatever color you want, like a rainbox highlighter? or something completely different? are you using a color array? a random color? thanks for your questions.
@@jonbednez ok thats a nice idea, to use an array of colors, which in my case, might do the job. although I was thinking that a rainbow type of interface, with a user interface similar to the one on the prefab mechanism would be more effective. what I want to create is a sort of daytime-nighttime sun controller, which not only changes the location and direction of the sun, but also changes the color and light intensity of the sun. the time of the day should be shorter than 24hours of course. nd this should be a parameter. but all the rest of variables could be pre-selected. but if user would like to change the color of the sun, they should be able to influence that.
@@ShacharOz To change the color of the sun, you could use a color picker. maybe something like this from the asset store -> assetstore.unity.com/packages/tools/gui/flexible-color-picker-150497. you could use the output to change the color of the directional light (if that's your sun)? With Color.Lerp, you can use a tick increment instead of the PingPong. currentTime += (Time.deltaTime * LerpSpeed); lerpedColor = Color.Lerp(Colors[0], Colors[1], currentTime);
Do you use color lerp in your game / app? Ping pong effects?
nice work. can you think of a way to do a change over time between several colors? not only 2? im thinking about something like in the particles engine.
good question! are you looking to modify the current script from this video? if you are referring to the particles system, what you could do is use 'Color over Lifetime' and have several color keys, using 'Blend'.
@@jonbednez no. i want to use the same method for another object. lets imagine you want to change between 10 colors according to some conditions. and not to create a fade between original color and a second one, as you did in the video.
@@ShacharOz the method being Color.Lerp? like I click an object, lerp to red. when I reach a trigger, lerp to yellow. this random condition, lerp to another color, etc. OR lerp from yellow to red to orange to whatever color you want, like a rainbox highlighter? or something completely different? are you using a color array? a random color? thanks for your questions.
@@jonbednez ok thats a nice idea, to use an array of colors, which in my case, might do the job.
although I was thinking that a rainbow type of interface, with a user interface similar to the one on the prefab mechanism would be more effective.
what I want to create is a sort of daytime-nighttime sun controller, which not only changes the location and direction of the sun, but also changes the color and light intensity of the sun.
the time of the day should be shorter than 24hours of course. nd this should be a parameter.
but all the rest of variables could be pre-selected.
but if user would like to change the color of the sun, they should be able to influence that.
@@ShacharOz To change the color of the sun, you could use a color picker. maybe something like this from the asset store -> assetstore.unity.com/packages/tools/gui/flexible-color-picker-150497. you could use the output to change the color of the directional light (if that's your sun)?
With Color.Lerp, you can use a tick increment instead of the PingPong. currentTime += (Time.deltaTime * LerpSpeed); lerpedColor = Color.Lerp(Colors[0], Colors[1], currentTime);