From c08af46d213b78b918db480cb53ee770bcf43189 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Aug 2015 16:14:15 -0400 Subject: [PATCH] stupid scroll reimplemented --- Assets/Scripts/NetworkingSphere.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/NetworkingSphere.cs b/Assets/Scripts/NetworkingSphere.cs index 6412814..724a62d 100644 --- a/Assets/Scripts/NetworkingSphere.cs +++ b/Assets/Scripts/NetworkingSphere.cs @@ -53,7 +53,7 @@ public class NetworkingSphere : MonoBehaviour transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed); } - //when right btn clicked, call the chnge rotation + //when right btn clicked, call MoveSphere if (Input.GetMouseButtonDown(1)) { dragging = true; @@ -68,6 +68,12 @@ public class NetworkingSphere : MonoBehaviour { MoveSphere(); } + + //scroll + if (Input.GetAxis("Mouse ScrollWheel") != 0) + { + Camera.main.fieldOfView += Input.GetAxis("Mouse ScrollWheel") * 10f; + } } void MoveSphere()