Ejemplo n.º 1
0
        public HmdToWorldTransformer(float estimatedEyeTrackerLatency_s)
        {
            _estimatedEyeTrackerLatency_s = estimatedEyeTrackerLatency_s;
            var latency_s     = (_estimatedPrediction_us / 1000000f) + estimatedEyeTrackerLatency_s;
            var frameLength_s = 1 / (XRDevice.refreshRate > 1 ? XRDevice.refreshRate : 90);

            _headPoseDelayInFrames = Mathf.CeilToInt(latency_s / frameLength_s);
            _history         = new HeadPoseSample[_headPoseDelayInFrames + 1];
            _cameraTransform = CameraHelper.GetCameraTransform();
            _useOpenVR       = OpenVRManager.IsAvailable();
        }