From bceb22c6aba8c6207697adfe4489c6089aa7898a Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 28 Sep 2026 15:39:25 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A2=E3=83=87=E3=83=AB=E3=81=AE=E6=9C=80?= =?UTF-8?q?=E5=88=9D=E3=81=AE=E5=90=91=E3=81=8D=E3=82=92=E5=8A=A0=E5=91=B3?= =?UTF-8?q?=E3=81=99=E3=82=8B(T-Pose=E3=81=A0=E3=81=8C=E9=81=95=E3=81=86?= =?UTF-8?q?=E6=96=B9=E5=90=91=E3=82=92=E5=90=91=E3=81=84=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=82=8B=E5=A0=B4=E5=90=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LookAt/LookAtEyeDirectionApplicableToBone.cs | 10 +++++----- .../Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Packages/VRM10/Runtime/Components/LookAt/LookAtEyeDirectionApplicableToBone.cs b/Packages/VRM10/Runtime/Components/LookAt/LookAtEyeDirectionApplicableToBone.cs index dee0ac4ea..511266c23 100644 --- a/Packages/VRM10/Runtime/Components/LookAt/LookAtEyeDirectionApplicableToBone.cs +++ b/Packages/VRM10/Runtime/Components/LookAt/LookAtEyeDirectionApplicableToBone.cs @@ -20,17 +20,17 @@ namespace UniVRM10 private readonly CurveMapper _horizontalInner; private readonly CurveMapper _verticalDown; private readonly CurveMapper _verticalUp; - - public LookAtEyeDirectionApplicableToBone(Transform leftEye, Transform rightEye, + + public LookAtEyeDirectionApplicableToBone(Quaternion root, Transform leftEye, Transform rightEye, CurveMapper horizontalOuter, CurveMapper horizontalInner, CurveMapper verticalDown, CurveMapper verticalUp) { _leftEye = leftEye; - var leftEyeRotation = _leftEye.rotation; + var leftEyeRotation = Quaternion.Inverse(root) * _leftEye.rotation; _leftEyePreMultiplyRotation = _leftEye.localRotation * Quaternion.Inverse(leftEyeRotation); _leftEyePostMultiplyRotation = leftEyeRotation; _rightEye = rightEye; - var rightEyeRotation = _rightEye.rotation; + var rightEyeRotation = Quaternion.Inverse(root) * _rightEye.rotation; _rightEyePreMultiplyRotation = _rightEye.localRotation * Quaternion.Inverse(rightEyeRotation); _rightEyePostMultiplyRotation = rightEyeRotation; @@ -39,7 +39,7 @@ namespace UniVRM10 _verticalDown = verticalDown; _verticalUp = verticalUp; } - + public void Apply(LookAtEyeDirection eyeDirection, Dictionary actualWeights) { SetYawPitchToBones(eyeDirection); diff --git a/Packages/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs b/Packages/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs index bdd550fc8..9bf9fada4 100644 --- a/Packages/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs +++ b/Packages/VRM10/Runtime/Components/Vrm10Runtime/Vrm10RuntimeLookAt.cs @@ -55,7 +55,7 @@ namespace UniVRM10 var rightEyeBone = humanoid.GetBoneTransform(HumanBodyBones.RightEye); if (_lookAt.LookAtType == LookAtType.bone && leftEyeBone != null && rightEyeBone != null) { - EyeDirectionApplicable = new LookAtEyeDirectionApplicableToBone(leftEyeBone, rightEyeBone, _lookAt.HorizontalOuter, _lookAt.HorizontalInner, _lookAt.VerticalDown, _lookAt.VerticalUp); + EyeDirectionApplicable = new LookAtEyeDirectionApplicableToBone(instance.transform.rotation, leftEyeBone, rightEyeBone, _lookAt.HorizontalOuter, _lookAt.HorizontalInner, _lookAt.VerticalDown, _lookAt.VerticalUp); } else {