File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Assets/FbxExporters/Editor Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -392,6 +392,12 @@ meshInfo.Vertices [v].z
392
392
// get a fbxNode's global default position.
393
393
protected void ExportTransform ( UnityEngine . Transform unityTransform , FbxNode fbxNode )
394
394
{
395
+ // Fbx rotation order is XYZ, but Unity rotation order is ZXY.
396
+ // This causes issues when converting euler to quaternion, causing the final
397
+ // rotation to be slighlty off.
398
+ // Fixed if we set the rotation order to the Unity rotation order in the FBX.
399
+ fbxNode . SetRotationOrder ( FbxNode . EPivotSet . eSourcePivot , FbxEuler . EOrder . eOrderZXY ) ;
400
+
395
401
// get local position of fbxNode (from Unity)
396
402
UnityEngine . Vector3 unityTranslate = unityTransform . localPosition ;
397
403
UnityEngine . Vector3 unityRotate = unityTransform . localRotation . eulerAngles ;
You can’t perform that action at this time.
0 commit comments