mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-26 12:50:40 -05:00
cone と hinge の angle は phi に相当する。
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user