Skip to content

Commit da816fc

Browse files
committed
minor change
1 parent e15ddef commit da816fc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/Slate/HandInteractionPanZoom.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ private void Update()
206206
#region Private Methods
207207
private bool TryGetMRControllerRayPoint(HandPanData data, out Vector3 rayPoint)
208208
{
209+
209210
if (data.currentPointer != null && data.currentController != null && data.currentController.IsPositionAvailable)
210211
{
211212
rayPoint = data.touchingInitialPt + (SnapFingerToQuad(data.currentPointer.Position) - data.initialProjectedOffset);
@@ -226,18 +227,18 @@ private bool UpdateHandTouchingPoint(uint sourceId)
226227

227228
if (data.IsActive == true)
228229
{
229-
if (TryGetMRControllerRayPoint(data, out tryHandPoint))
230-
{
231-
tryGetSucceeded = true;
232-
}
233-
else if (data.IsSourceNear == true)
230+
if (data.IsSourceNear == true)
234231
{
235232
tryGetSucceeded = TryGetHandPositionFromController(data.currentController, TrackedHandJoint.IndexTip, out tryHandPoint);
236233
}
237234
else
238235
{
239236
tryGetSucceeded = TryGetHandPositionFromController(data.currentController, TrackedHandJoint.Palm, out tryHandPoint);
240237
}
238+
if (!tryGetSucceeded)
239+
{
240+
tryGetSucceeded = TryGetMRControllerRayPoint(data, out tryHandPoint);
241+
}
241242

242243
if (tryGetSucceeded == true)
243244
{

0 commit comments

Comments
 (0)