Guest User

Untitled

a guest
Jul 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #if UNITY_EDITOR
  2. // Update is called once per frame
  3. void Update()
  4. {
  5. if((Application.isEditor || !runInEditorOnly) && !UnityEngine.XR.XRSettings.enabled)
  6. {
  7. CameraObject.localEulerAngles = new Vector3(Input.mousePosition.y.Remap(0, Screen.height, rotationMargin, -rotationMargin),
  8. Input.mousePosition.x.Remap(0, Screen.width, -rotationMargin, rotationMargin),
  9. 0);
  10. }
  11.  
  12. }
  13. #endif
Add Comment
Please, Sign In to add comment