Question by 
               Kanakanarzz · Oct 18, 2015 at 09:14 AM · 
                mousecontrollerbeginnerlightmove  
              
 
              How to make my flashlight move with the mouse movement?
I have attached the light to the camera and works great but I won't the chapter to have control where they shine the light by using the mouse.
How do I do this?
At the moment the light just follows the camera and there is little control.
Heres my script:
function Update () {
if (Input.GetKeyDown("f")) {
   if (GetComponent.<Light>().enabled == true)
       GetComponent.<Light>().enabled = false;
       else
       
       GetComponent.<Light>().enabled = true;
       }
}
Thnx
p.s: I'm in a 3D scene using first person.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                