Skip to content

Commit

Permalink
腰トラッカー無しで胸トラッカーがある場合、胸を腰に自動再割り当てする
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-akira committed Dec 28, 2024
1 parent 70fc075 commit ae2cc73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Assets/Scripts/Avatar/MotionTracking/IKManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,13 @@ public IEnumerator Calibrate(PipeCommands.CalibrateType calibrateType)
}
catch { }

if (bodyTracker == null && chestTracker != null)
{
Debug.LogWarning("*No waist tracker. Reassign chest tracker to waist.");
bodyTracker = chestTracker;
chestTracker = null;
}

if (calibrateType == PipeCommands.CalibrateType.Ipose || calibrateType == PipeCommands.CalibrateType.Tpose)
{
yield return FinalIKCalibrator.Calibrate(calibrateType == PipeCommands.CalibrateType.Ipose ? FinalIKCalibrator.CalibrateMode.Ipose : FinalIKCalibrator.CalibrateMode.Tpose, HandTrackerRoot, PelvisTrackerRoot, vrik, settings, headTracker, bodyTracker, leftHandTracker, rightHandTracker, leftFootTracker, rightFootTracker, leftElbowTracker, rightElbowTracker, leftKneeTracker, rightKneeTracker, chestTracker, generatedObject);
Expand Down
6 changes: 5 additions & 1 deletion Assets/Scripts/ControlWPFWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,11 @@ private async void LogMessageHandler(string cond, string trace, LogType type)
}

//通知レベルがLog以外の時かつ、Warning以下かつ、*から始まらないものはうるさいので飛ばさない
if (notifyLogLevel != NotifyLogTypes.Log && notifyLogLevel <= notifyType && !cond.StartsWith("*"))
if (cond.StartsWith("*"))
{
cond = cond.Substring(1);
}
else if (notifyLogLevel != NotifyLogTypes.Log && notifyLogLevel <= notifyType)
{
return;
}
Expand Down

0 comments on commit ae2cc73

Please sign in to comment.