Skip to content

Commit

Permalink
Fix FPFC making avatar fly around after first toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoco007 committed Mar 14, 2024
1 parent a3a7ae8 commit 2443a08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/CustomAvatar/Tracking/TrackingRig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ internal bool showRenderModels
}
}

private bool _shouldBeEnabled => _vrPlatformHelper != null && _vrPlatformHelper.hasInputFocus && _vrPlatformHelper.hasVrFocus && !_fpfcSettings.Enabled;
private bool _shouldBeEnabled => _vrPlatformHelper != null && _vrPlatformHelper.hasInputFocus && _vrPlatformHelper.hasVrFocus;

internal void BeginCalibration(CalibrationMode calibrationMode)
{
Expand Down Expand Up @@ -325,6 +325,7 @@ private void Start()
}

this.enabled = this._shouldBeEnabled;
_parentConstraint.enabled = _scaleConstraint.enabled = !_fpfcSettings.Enabled;

UpdateOffsets();
UpdateControllerOffsets();
Expand Down Expand Up @@ -501,6 +502,7 @@ private void OnControllersDidChangeReference()
private void OnInputFocusWasChanged()
{
this.enabled = _shouldBeEnabled;
_parentConstraint.enabled = _scaleConstraint.enabled = !_fpfcSettings.Enabled;
}

private void UpdateOffsets()
Expand Down

0 comments on commit 2443a08

Please sign in to comment.