diff --git a/Assets/Scripts/RotationConvert.cs b/Assets/Scripts/RotationConvert.cs index bde2f7b..c2a9b58 100644 --- a/Assets/Scripts/RotationConvert.cs +++ b/Assets/Scripts/RotationConvert.cs @@ -4,7 +4,7 @@ using UnityEngine; public class RotationConvert : MonoBehaviour { - public static Vector3 fromMaya(Vector3 euler_angle) + public static Quaternion fromMaya(Vector3 euler_angle) { euler_angle.x *= Mathf.Deg2Rad; euler_angle.y *= Mathf.Deg2Rad; @@ -22,10 +22,6 @@ public class RotationConvert : MonoBehaviour float z = c * d * h - f * g * e; float w = c * d * e + f * g * h; - Vector3 realAngle = new Quaternion(x, y, z, w).eulerAngles; - realAngle.x = Mathf.Repeat(realAngle.x + 180, 360) - 180; - realAngle.y = Mathf.Repeat(realAngle.y + 180, 360) - 180; - realAngle.z = Mathf.Repeat(realAngle.z + 180 ,360) - 180; - return realAngle; + return new Quaternion(x, y, z, w); } } diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index b369bf1..8ac3dcb 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -197,7 +197,7 @@ namespace Gallop public void ApplyRotation(){ foreach (var trs in RotationRecorder) { - trs.Key.localEulerAngles = RotationConvert.fromMaya(trs.Value); + trs.Key.localRotation = RotationConvert.fromMaya(trs.Value); } }