void OculusRiftCamera::update()
{
- ovrTrackingState state = ovrHmd_GetTrackingState(device.get_private().ovr_hmd, ovr_GetTimeInSeconds());
+ double time;
+ if(device.is_timing_active())
+ time = device.get_tracking_time();
+ else
+ time = device.get_current_time();
+
+ ovrTrackingState state = ovrHmd_GetTrackingState(device.get_private().ovr_hmd, time);
OVR::Posef head_pose = state.HeadPose.ThePose;
OVR::Matrix4f tracking_matrix(head_pose.Rotation);
OVR::Vector3f trans = head_pose.Translation;