sphere zooming exception if on the right side of the screen

This commit is contained in:
unknown 2015-08-14 20:13:51 -04:00
parent b9162ffd44
commit a8a4490a68

View File

@ -72,7 +72,11 @@ public class NetworkingSphere : MonoBehaviour
//scroll
if (Input.GetAxis("Mouse ScrollWheel") != 0)
{
Camera.main.fieldOfView += Input.GetAxis("Mouse ScrollWheel") * 10f;
// if (Camera.main.ScreenToViewportPoint(Input.mousePosition) < new Vector3(1,1,1))
if (Camera.main.ScreenToViewportPoint(Input.mousePosition).x < 1)
{
Camera.main.fieldOfView += Input.GetAxis("Mouse ScrollWheel") * 10f;
}
}
}