From 26a96f5cbe8a61bb0c0afcc08b49a94841eb2408 Mon Sep 17 00:00:00 2001 From: ousttrue Date: Thu, 18 Sep 2025 14:52:23 +0900 Subject: [PATCH] =?UTF-8?q?cone=20=E3=81=A8=20hinge=20=E3=81=AE=20angle=20?= =?UTF-8?q?=E3=81=AF=20phi=20=E3=81=AB=E7=9B=B8=E5=BD=93=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/VRM10/Runtime/IO/Vrm10Exporter.cs | 6 +++--- Assets/VRM10/Runtime/IO/Vrm10Importer.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs index 51d2ba108..45d24fcaf 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Exporter.cs @@ -462,7 +462,7 @@ namespace UniVRM10 Cone = new UniGLTF.Extensions.VRMC_springBone_limit.ConeLimit { Rotation = ReverseX(y.m_limitSpaceOffset), - Angle = y.m_theta, + Angle = y.m_phi, } } }; @@ -480,7 +480,7 @@ namespace UniVRM10 Hinge = new UniGLTF.Extensions.VRMC_springBone_limit.HingeLimit { Rotation = ReverseX(y.m_limitSpaceOffset), - Angle = y.m_theta, + Angle = y.m_phi, } } }; @@ -499,7 +499,7 @@ namespace UniVRM10 { Rotation = ReverseX(y.m_limitSpaceOffset), Theta = y.m_theta, - Phi = y.m_theta, + Phi = y.m_phi, } } }; diff --git a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs index 2f4c25cf3..df3157be9 100644 --- a/Assets/VRM10/Runtime/IO/Vrm10Importer.cs +++ b/Assets/VRM10/Runtime/IO/Vrm10Importer.cs @@ -636,20 +636,20 @@ namespace UniVRM10 { joint.m_anglelimitType = UniGLTF.SpringBoneJobs.AnglelimitTypes.Cone; joint.m_limitSpaceOffset = QuaternionFromFloat4(cone.Rotation); - joint.m_theta = cone.Angle.GetValueOrDefault(Mathf.PI * 0.5f); + joint.m_phi = cone.Angle.GetValueOrDefault(Mathf.PI * 0.5f); } else if (extensionSpringBoneLimit.Limit.Hinge is UniGLTF.Extensions.VRMC_springBone_limit.HingeLimit hinge) { joint.m_anglelimitType = UniGLTF.SpringBoneJobs.AnglelimitTypes.Hinge; joint.m_limitSpaceOffset = QuaternionFromFloat4(hinge.Rotation); - joint.m_theta = hinge.Angle.GetValueOrDefault(Mathf.PI * 0.5f); + joint.m_phi = hinge.Angle.GetValueOrDefault(Mathf.PI * 0.5f); } else if (extensionSpringBoneLimit.Limit.Spherical is UniGLTF.Extensions.VRMC_springBone_limit.SphericalLimit spherical) { joint.m_anglelimitType = UniGLTF.SpringBoneJobs.AnglelimitTypes.Spherical; joint.m_limitSpaceOffset = QuaternionFromFloat4(spherical.Rotation); + joint.m_phi = spherical.Phi.GetValueOrDefault(Mathf.PI * 0.5f); joint.m_theta = spherical.Theta.GetValueOrDefault(Mathf.PI * 0.5f); - joint.m_theta = spherical.Phi.GetValueOrDefault(Mathf.PI * 0.5f); } }