- Home /
Screen Position Out of view frustum error while zooming in gun
So im getting this error:
https://gyazo.com/7d7ea050be9516e3a961a4103f46d1e5
My script is this (it zooms and unzooms and if I spam it a lot and bring up the pause panel the camera totally glitches out and gives me that error). I tried the scene closing and reopening and restating unity, this is a new bug since I implimented the zoom feature. Any help would be greatly appreciated. :) Script (java): private var baseFOV : float; private var speed : float = 37.5f;
 function Start () {
     baseFOV = Camera.main.fieldOfView;
 }
  
 function Update () {
     if (Input.GetMouseButton(1))
     {
         Camera.main.fieldOfView = Mathf.Lerp(Camera.main.fieldOfView,40,Time.deltaTime*speed);    Time.timeScale = 0.4f;
         Time.fixedDeltaTime = 0.02f * Time.timeScale;
     }
 
     else {
         Camera.main.fieldOfView = Mathf.Lerp(Camera.main.fieldOfView,baseFOV,Time.deltaTime*speed);   Time.timeScale = 1;
         Time.fixedDeltaTime = 0.02f * Time.timeScale;
   
     }
 }
Thank you!
Your answer
 
 
             Follow this Question
Related Questions
On fov change, screen position out of view of frustum error 1 Answer
Screen position out of view frustum error, cannot solve? 1 Answer
Camera movement in a 2D? (like angry birds) 1 Answer
JDK home issue (Mac to android) 0 Answers
Possible to use an oblique frustum camera and still be able to change the fov? 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                