using UnityEngine;
using System.Collections;

public class ReCenter : MonoBehaviour
{
    public KeyCode recenterKey;

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(recenterKey))
        {
                var tracker = SteamVR_Render.Top();
                if (tracker != null)
                {
                    var render = SteamVR_Render.instance;
                    render.trackingSpace = Valve.VR.ETrackingUniverseOrigin.TrackingUniverseSeated;
                    SteamVR svr = SteamVR.instance;
                    svr.hmd.ResetSeatedZeroPose();
                }
        }
    }
}