// Update is called once per frame
        void Update()
        {
            //InitCameraControllerVariables();
            //ConfigureCameraLensCorrection(ref _leftCamera);
            //ConfigureCameraLensCorrection(ref _rightCamera);

            //IVRDevice.GetOrientation (0, ref _gyroAttitude);

            if (Input.GetKey(KeyCode.Alpha3))
            {
                IVRDevice.ResetOrientation(0);
            }

#if !UNITY_EDITOR_OSX
            IVRDevice.GetPredictedOrientation(0, ref _gyroAttitude);
            transform.localRotation = _gyroAttitude;
#endif
        }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        //InitCameraControllerVariables();
        //ConfigureCameraLensCorrection(ref _leftCamera);
        //ConfigureCameraLensCorrection(ref _rightCamera);

        //IVRDevice.GetOrientation (0, ref _gyroAttitude);

#if CHILDREN_VR
        if (Input.GetKey(KeyCode.Alpha3) && rotation_fix == false)
        {
            IVRDevice.ResetOrientation(0);
            rotation_fix = true;
        }
#endif

        IVRDevice.GetPredictedOrientation(0, ref _gyroAttitude);
        transform.localRotation = _gyroAttitude;

        // print(transform.localRotation);
    }