- Home /
How To Make A Gun Scope Zoom In
Hello,
I Have my basic gun scope script:
 var posNotAiming : Vector3 = Vector3(-69.07644, -16.59074, -27.22817);
 var posAiming : Vector3 = Vector3(0, 1, 0);
 var aimRacio : float = 0.4;
 var cameraObject : GameObject;
 
 function Update()
 {
     if(Input.GetButton("Fire2")){
        cameraObject.GetComponent(FPSMouseLook).currentAimRacio = aimRacio;
         transform.localPosition = Vector3.Lerp(transform.localPosition, posNotAiming, 0.1f);}
     else{
        cameraObject.GetComponent(FPSMouseLook).currentAimRacio = 1;
         transform.localPosition = Vector3.Lerp(transform.localPosition, posAiming, 0.1f);} 
 }
I Want the scope not just to come to the centre of the screen but also zoom in a little. If you know how I Can edit the script, leave a comment below! Thanks in advance!
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Paulo-Henrique025 · Aug 18, 2012 at 03:01 AM
Here, some who already did that:
http://answers.unity3d.com/questions/20334/sniper-zoom-when-right-click.html http://answers.unity3d.com/questions/25118/how-do-you-zoom-with-a-sniper.html http://answers.unity3d.com/questions/177583/sniper-zoom.html
Answer by Poterpik · Apr 20, 2017 at 08:15 PM
You can check this tutorial : http://proreviewly.com/rifle-scope-adjustments-work/
Your answer
 
 
             Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How To Set Scope Speed 2 Answers
Gun Scope Not Centered 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                