- Home /
How to make flashing/blinking/flickering lights?
Is there any way to make my directional light flicker, flash or blink on and off repeatedly?
Thanks in advance!
Comment
Answer by Piflik · Aug 27, 2012 at 05:17 PM
I would probably use Random.Range to generate a random number each frame and then animate the light based on that.
Something like this (probably after some major tweaking):
randNmbr = Random.Range(-1.0, 1.0);
light.intensity += randNmbr;
if(light.intensity > 1.0)
light.intensity = 1.0;
if(light.intensity < 0.0)
light.intensity = 0.0;
Your answer
Follow this Question
Related Questions
Police Flashing Lights? 4 Answers
Police flashing light script 2 Answers
Make character flash when taking damage [SOLVED] 0 Answers
Flickering Lights in Web Player 1 Answer
Bumped Specular Terrain flickering. 1 Answer