Skip to content

Commit 0e17568

Browse files
author
David Kline
authored
Merge pull request #9935 from davidkline-ms/handConstraintTidy
Some cleanup to the HandConstraint* scripts
2 parents a91fa96 + 83e8db6 commit 0e17568

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Assets/MRTK/SDK/Features/Utilities/Solvers/HandConstraint.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ private static Ray CalculateRayForSafeZone(
547547
direction = IsPalmFacingCamera(hand) ? direction : -direction;
548548
}
549549

550-
if (hand.ControllerHandedness == Handedness.Right)
550+
if (hand.ControllerHandedness.IsRight())
551551
{
552552
direction = -direction;
553553
}
@@ -672,7 +672,7 @@ private static bool IsPalmFacingCamera(IMixedRealityController hand)
672672
/// </remarks>
673673
private static bool IsApplicableController(IMixedRealityController controller)
674674
{
675-
return controller.ControllerHandedness != Handedness.None;
675+
return !controller.ControllerHandedness.IsNone();
676676
}
677677

678678
/// <summary>

Assets/MRTK/SDK/Features/Utilities/Solvers/HandConstraintPalmUp.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ private bool TryGenerateActivationPoint(IMixedRealityHand jointedHand, out Vecto
372372
break;
373373
case SolverSafeZone.UlnarSide:
374374
default:
375-
referenceJoint1 = TrackedHandJoint.IndexKnuckle;
376-
referenceJoint2 = TrackedHandJoint.ThumbProximalJoint;
375+
referenceJoint1 = TrackedHandJoint.PinkyKnuckle;
376+
referenceJoint2 = TrackedHandJoint.Wrist;
377377
break;
378378
}
379379

0 commit comments

Comments
 (0)