Skip to content

Commit c8760a8

Browse files
committed
prevent cursor from disappearing on manipulation cancel
1 parent e5fc8c3 commit c8760a8

File tree

1 file changed

+6
-2
lines changed
  • Assets/HoloToolkit/Input/Scripts/Cursor

1 file changed

+6
-2
lines changed

Assets/HoloToolkit/Input/Scripts/Cursor/Cursor.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,14 @@ public virtual CursorStateEnum CheckCursorState()
417417
{
418418
if (cursorState != CursorStateEnum.Contextual)
419419
{
420-
if (IsInputSourceDown)
420+
if (IsInputSourceDown && visibleHandsCount > 0)
421421
{
422422
return CursorStateEnum.Select;
423423
}
424+
else if (IsInputSourceDown && visibleHandsCount == 0)
425+
{
426+
IsInputSourceDown = false;
427+
}
424428
else if (cursorState == CursorStateEnum.Select)
425429
{
426430
return CursorStateEnum.Release;
@@ -444,4 +448,4 @@ public virtual void OnCursorStateChange(CursorStateEnum state)
444448
cursorState = state;
445449
}
446450
}
447-
}
451+
}

0 commit comments

Comments
 (0)