Skip to content

Commit dc46f88

Browse files
committed
document why we are using certain tangent settings
1 parent 736f12a commit dc46f88

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

com.unity.formats.fbx/Editor/FbxExporter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,12 @@ internal static void ExportAnimationKeys (AnimationCurve uniAnimCurve, FbxAnimCu
17631763
// configure tangents
17641764
var lTangent = AnimationUtility.GetKeyLeftTangentMode(uniAnimCurve, keyIndex);
17651765
var rTangent = AnimationUtility.GetKeyRightTangentMode(uniAnimCurve, keyIndex);
1766+
1767+
// Always set tangent mode to eTangentBreak, as other modes are not handled the same in FBX as in
1768+
// Unity, thus leading to discrepancies in animation curves.
17661769
FbxAnimCurveDef.ETangentMode tanMode = FbxAnimCurveDef.ETangentMode.eTangentBreak;
1770+
1771+
// Default to cubic interpolation, which is the default for KeySet
17671772
FbxAnimCurveDef.EInterpolationType interpMode = FbxAnimCurveDef.EInterpolationType.eInterpolationCubic;
17681773
switch (rTangent)
17691774
{

0 commit comments

Comments
 (0)