Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: mxitwm on August 12, 2013, 07:38:13 AM
-
Hello, looking for the best way to move a camera using NGUI's scroll bar. The camera needs to move up and down along the y Axis according to the position of the thumb. Using additional scroll bars I also need to change the camera's rotation on X as well as the depth of field or transform along Z axis. Any ideas or recommended solutions would be appreciated. I am new to Unity and NGUI, busy making my through C# tutorials (due to NGUI) but would appreciate any guidance so I can get this bedded down asap.
-
ScrollBar.scrollValue gives you the value in 0-1 range, so just use Mathf.Lerp(minCameraVal, maxCameraVal, scrollBar.scrollValue);