Skip to content

Commit 6ee3b5d

Browse files
committed
add post rotation so light has correct rotation on export
1 parent 35d8183 commit 6ee3b5d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Assets/FbxExporters/Editor/FbxExporter.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,11 @@ protected bool ExportLight (GameObject unityGo, FbxScene fbxScene, FbxNode fbxNo
973973

974974
fbxNode.SetNodeAttribute (fbxLight);
975975

976+
// set +90 post rotation on x to counteract for FBX light's facing -Y direction by default
977+
fbxNode.SetPostRotation(FbxNode.EPivotSet.eSourcePivot, new FbxVector4(90,0,0));
978+
// have to set rotation active to true in order for post rotation to be applied
979+
fbxNode.SetRotationActive (true);
980+
976981
return true;
977982
}
978983

0 commit comments

Comments
 (0)