Skip to content

Commit 61c0c77

Browse files
updated mouse pointer
1 parent 75dc794 commit 61c0c77

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Assets/MixedRealityToolkit-SDK/Features/UX/Scripts/Pointers/MousePointer.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,25 @@ public override void OnPositionInputChanged(InputEventData<Vector2> eventData)
9393
}
9494
}
9595

96+
protected override void Start()
97+
{
98+
base.Start();
99+
100+
if (RayStabilizer != null)
101+
{
102+
RayStabilizer = null;
103+
}
104+
105+
foreach (var inputSource in InputSystem.DetectedInputSources)
106+
{
107+
if (inputSource.SourceId == Controller.InputSource.SourceId)
108+
{
109+
isInteractionEnabled = true;
110+
break;
111+
}
112+
}
113+
}
114+
96115
/// <inheritdoc />
97116
public override void OnSourceDetected(SourceStateEventData eventData)
98117
{
@@ -105,6 +124,7 @@ public override void OnSourceDetected(SourceStateEventData eventData)
105124

106125
if (eventData.InputSource.SourceId == Controller.InputSource.SourceId)
107126
{
127+
Debug.Log("Pointer detected");
108128
isInteractionEnabled = true;
109129
}
110130
}

0 commit comments

Comments
 (0)