Skip to content

Commit

Permalink
Avoid error message in Snug when no hands area available (just don't …
Browse files Browse the repository at this point in the history
…move hands)
  • Loading branch information
acidbubbles committed Mar 5, 2021
1 parent 59e62ef commit b57fe3b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Snug/SnugModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@ public override void OnEnable()
SuperController.LogError($"Embody: Failed to initialize Snug. {exc}");
enabledJSON.val = false;
}

if (!_lHand.active || !_rHand.active)
{
SuperController.LogError($"Embody: Failed to initialize Snug hands. No motion tracker to bind to. If using Leap Motion, make sure both hands are visible when you activate Embody.");
enabledJSON.val = false;
}
}

private void EnableHand(SnugHand hand, string motionControlName)
Expand Down Expand Up @@ -340,6 +334,8 @@ private void ProcessHand(SnugHand hand)
var motionControlPosition = motionControl.currentMotionControl.position;
var visualCueLinePoints = hand.visualCueLinePoints;

if (!hand.motionControl.currentMotionControl.gameObject.activeInHierarchy) return;

// Find the anchor over and under the controller
ControllerAnchorPoint lower = null;
ControllerAnchorPoint upper = null;
Expand Down

0 comments on commit b57fe3b

Please sign in to comment.