private void Update()
        {
            using (UpdateConeCastPerfMarker.Auto())
            {
                if (MixedRealityRaycaster.DebugEnabled && gazeTransform != null)
                {
                    Debug.DrawRay(GazeOrigin, (HitPosition - GazeOrigin), Color.white);
                }

                // If flagged to do so (setCursorInvisibleWhenFocusLocked) and active (IsInteractionEnabled), set the visibility to !IsFocusLocked,
                // but don't touch the visibility when not active or not flagged.
                if (setCursorInvisibleWhenFocusLocked && coneCastPointer != null &&
                    coneCastPointer.IsInteractionEnabled && GazeCursor != null && coneCastPointer.IsFocusLocked == GazeCursor.IsVisible)
                {
                    GazeCursor.SetVisibility(!coneCastPointer.IsFocusLocked);
                }

                // Handle toggling the input source's SourceType based on the current eyetracking mode
                if (IsEyeTrackingEnabledAndValid)
                {
                    gazeInputSource.SourceType = InputSourceType.Eyes;
                }
                else
                {
                    gazeInputSource.SourceType = InputSourceType.Head;
                }
            }
        }
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
 void Start()
 {
     _gazeCursor     = GazeCursor.Instance;
     _testController = TestController.Instance;
     Rudder          = s3DRudderManager.Instance.GetRudder(0);
     connector       = Connector.getInstance();
     connector.AutoConnect();
     _pupilTracker.SetShowDot(false);
 }
示例#4
0
        private void Update()
        {
            if (MixedRealityRaycaster.DebugEnabled && gazeTransform != null)
            {
                Debug.DrawRay(GazeOrigin, (HitPosition - GazeOrigin), Color.white);
            }

            if (setCursorInvisibleWhenFocusLocked && GazePointer?.IsFocusLocked == GazeCursor?.IsVisible)
            {
                GazeCursor.SetVisibility(!GazePointer.IsFocusLocked);
            }
        }
示例#5
0
        private void Update()
        {
            if (MixedRealityRaycaster.DebugEnabled && gazeTransform != null)
            {
                Debug.DrawRay(GazeOrigin, (HitPosition - GazeOrigin), Color.white);
            }

            // If flagged to do so (setCursorInvisibleWhenFocusLocked) and active (IsInteractionEnabled), set the visibility to !IsFocusLocked,
            // but don't touch the visibility when not active or not flagged.
            if (setCursorInvisibleWhenFocusLocked && (GazePointer?.IsInteractionEnabled ?? false) && GazePointer?.IsFocusLocked == GazeCursor?.IsVisible)
            {
                GazeCursor.SetVisibility(!GazePointer.IsFocusLocked);
            }
        }
示例#6
0
 void Start()
 {
     cursorMeshRenderer = gameObject.GetComponent <Renderer>();
     mainCamera         = Camera.main;
     Instance           = this;
 }