IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
RecenterVR.cs
1 using UnityEngine;
2 using System.Collections;
3 
4 public class RecenterVR : MonoBehaviour {
5 
6  // Use this for initialization
7  void Start () {
8  Cursor.visible = false;
9  }
10 
11  // Update is called once per frame
12  void Update () {
13  if (Input.GetKeyDown(KeyCode.R))
14  {
15  UnityEngine.XR.InputTracking.Recenter();
16  }
17  }
18 }