Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

On fov change, screen position out of view of frustum error

$
0
0
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; } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>