Skip to content

Commit

Permalink
複数回キャリブレーションした際に膝の向きが壊れる問題修正
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-akira committed Dec 27, 2024
1 parent 1b417ec commit 70fc075
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Assets/Scripts/Avatar/BoneBendGoal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void OnDestroy()
private void OnPostUpdate()
{
if (enabled == false) return;
if (IKManager.Instance.vrik == null) return;

Quaternion currentEndBoneRotation = EndBone.rotation;

Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/Avatar/WristRotationFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ void OnDestroy()

private void OnPostUpdate()
{
if (IKManager.Instance.vrik == null) return;

FixAxis(LeftElbowFixItem);
FixAxis(LeftUpperArmFixItem);
FixAxis(RightElbowFixItem);
Expand Down
1 change: 1 addition & 0 deletions Assets/VRIKSpineOffset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private void OnDisable()

private void AfterVRIK()
{
if (IKManager.Instance.vrik == null) return;
Vector3 headPos = ik.references.head.position;
Quaternion headRot = ik.references.head.rotation;

Expand Down

0 comments on commit 70fc075

Please sign in to comment.