From 7b75eb562a8f003737f410f68a6c7482613fc839 Mon Sep 17 00:00:00 2001 From: Thor Brigsted Date: Mon, 1 Apr 2019 00:39:13 +0200 Subject: [PATCH] Fixed #12 --- Scripts/GLTFAnimation.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/GLTFAnimation.cs b/Scripts/GLTFAnimation.cs index 0e7afd9..ca42769 100644 --- a/Scripts/GLTFAnimation.cs +++ b/Scripts/GLTFAnimation.cs @@ -82,7 +82,7 @@ public override void Load() { for (int k = 0; k < keyframeInput.Length; k++) { posX.AddKey(keyframeInput[k], pos[k].x); posY.AddKey(keyframeInput[k], pos[k].y); - posZ.AddKey(keyframeInput[k], pos[k].z); + posZ.AddKey(keyframeInput[k], -pos[k].z); } Clip.SetCurve(relativePath, typeof(Transform), "localPosition.x", posX); Clip.SetCurve(relativePath, typeof(Transform), "localPosition.y", posY); @@ -97,8 +97,8 @@ public override void Load() { for (int k = 0; k < keyframeInput.Length; k++) { rotX.AddKey(keyframeInput[k], rot[k].x); rotY.AddKey(keyframeInput[k], rot[k].y); - rotZ.AddKey(keyframeInput[k], rot[k].z); - rotW.AddKey(keyframeInput[k], rot[k].w); + rotZ.AddKey(keyframeInput[k], -rot[k].z); + rotW.AddKey(keyframeInput[k], -rot[k].w); } Clip.SetCurve(relativePath, typeof(Transform), "localRotation.x", rotX); Clip.SetCurve(relativePath, typeof(Transform), "localRotation.y", rotY);