- Home /
 
 
               Question by 
               killer-zog · Jun 24, 2013 at 06:28 PM · 
                lighteffectintensityeasing  
              
 
              light intensity change with easing problem!!
hi i have this script named light control.js
 var sun : GameObject;
 var lightchange: float = 0.1;
 var lightnormal: float = 0.7;
  
  
 function OnTriggerEnter() {
     sun.light.intensity = lightchange;
     
 }
  
 function OnTriggerExit() {
     sun.light.intensity = lightnormal;
 }
 
               now as you can see i have a collider trigger to decrease the intensity of sun(directional light). but the problem is the intensity changed quickly without any easing effect...
i searched a lot to how to easing the changing between them but cant actually add them to my script to make it working... :( Tell me how to do the easing thing and how to add that...
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by create3dgames · Jun 24, 2013 at 09:35 PM
The best way is to create a quick animation which animates the light intensity.
Your answer
 
             Follow this Question
Related Questions
Flashlight effect 2 Answers
I Cant Disactive Image Effects 2 Answers
How can I dim light over time? 2 Answers
Error CS(11,10)an object reference is required non static member 'UnityEngine.Light.intensity‘ 2 Answers