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); } }