Skip to main content
Up and Coming
December 29, 2015

Unity 5.3 how recenter camera VR

Hi, a simple question
How to recetner normal VR camera in Unity 5.3?

I am starting with, but gives an error

using UnityEngine;
using System.Collections;
using VR= UnityEngine.VR;
public class recenter : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (Input.GetKeyDown (KeyCode.R)) {
VR.InputTracking.Recenter ();
}
}
}
    This topic has been closed for replies.

    2 replies

    Inspiring
    December 29, 2015
    What does the error message say?

    Also, I believe you can just call it like this:


    using UnityEngine.VR;
    ...
    InputTracking.Recenter()
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    panmasterAuthor
    Up and Coming
    December 29, 2015
    "cybereality" wrote:
    What does the error message say?

    Also, I believe you can just call it like this:


    using UnityEngine.VR;
    ...
    InputTracking.Recenter()



    OK this works,thx!