Example #1
0
        public override bool GetHmdYaw(ref double yaw)
        {
            if (StopRequested)
            {
                return(false);
            }

            if (OculusStatus != OculusConnectionStatus.AllOk)
            {
                return(false);
            }

            TrackingState ts = OculusWrap.GetTrackingState(SessionPtr, 0, false);

            // I suppose for Oculus there is no need to check if the received orientation is valid... (compare to OpenVR)
            yaw = GetYawFromOrientation(ts.HeadPose.ThePose.Orientation);
            return(true);
        }