File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Assets/MixedRealityToolkit-SDK/Features/UX/Scripts/Pointers Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ public override void OnSourcePoseChanged(SourcePoseEventData<Vector2> eventData)
144144 /// <inheritdoc />
145145 public override void OnInputDown ( InputEventData eventData )
146146 {
147- cursorWasDisabledOnDown = ! BaseCursor . IsVisible ;
147+ cursorWasDisabledOnDown = isDisabled ;
148148
149149 if ( cursorWasDisabledOnDown )
150150 {
@@ -160,7 +160,7 @@ public override void OnInputDown(InputEventData eventData)
160160 /// <inheritdoc />
161161 public override void OnInputUp ( InputEventData eventData )
162162 {
163- if ( BaseCursor . IsVisible && ! cursorWasDisabledOnDown )
163+ if ( ! isDisabled && ! cursorWasDisabledOnDown )
164164 {
165165 base . OnInputUp ( eventData ) ;
166166 }
@@ -230,14 +230,15 @@ private void UpdateMousePosition(float mouseX, float mouseY)
230230 BaseCursor ? . SetVisibility ( true ) ;
231231 transform . rotation = CameraCache . Main . transform . rotation ;
232232 }
233- else
234- {
235- timeoutTimer = 0.0f ;
236- }
237233
238234 isDisabled = false ;
239235 }
240236
237+ if ( ! isDisabled )
238+ {
239+ timeoutTimer = 0.0f ;
240+ }
241+
241242 var newRotation = Vector3 . zero ;
242243 newRotation . x += mouseX ;
243244 newRotation . y += mouseY ;
You can’t perform that action at this time.
0 commit comments