Skip to content

Commit 4fffb44

Browse files
authored
Merge pull request #237 from Unity-Technologies/UNI-32051-fix-camera-export-rotation
UNI-32051 fix camera exporting with 90 degree rotation
2 parents 720a7eb + 05f6fd2 commit 4fffb44

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
@@ -839,6 +839,11 @@ protected bool ExportCamera (GameObject unityGO, FbxScene fbxScene, FbxNode fbxN
839839

840840
fbxNode.SetNodeAttribute (fbxCamera);
841841

842+
// set +90 post rotation to counteract for FBX camera's facing +X direction by default
843+
fbxNode.SetPostRotation(FbxNode.EPivotSet.eSourcePivot, new FbxVector4(0,90,0));
844+
// have to set rotation active to true in order for post rotation to be applied
845+
fbxNode.SetRotationActive (true);
846+
842847
// make the last camera exported the default camera
843848
DefaultCamera = fbxNode.GetName ();
844849

0 commit comments

Comments
 (0)