I have a few cameras in Blender to export to Unity3D. They're exported as empty
GameObjects, and that's what is expected. The idea is to have the main camera be a child of one of the camera empty
In Blender, for the world, +Y is forward, +Z is up. But the camera is -Z is forward, +Y is up. In Blender, I have to set the camera's rotation to (90, 0, 0) just to have the camera not face down. But it the camera doesn't face the same direction as the camera in Blender.
I tried rotating the camera game objects by Y+180 so that the camera faces +Z, parent the camera
GameObject, then zero out its position and rotation.
How can I have a 1:1 export from Blender to Unity3D for camera objects?
Edit: I am exporting FBX binary 7.4 files.
Edit: Here is a table:
Blender RotXYZ Unity global RotXYZ Expected rotation ( 0, 0, 0) ( 0, -90, 90) ( 90, 0, 0) (90, 0, 0) ( 0, -90, 0) ( 0, 0, 0) ( 0, 90, 0) ( 90, 180, 0) ( 0, -90, -90) ( 0, 0, 90) ( 0, 180, 90) ( 90, -90, 0)
If I input any of the
Blender RotXYZ values into Blender's camera rotation, export the FBX, I get the corresponding value in the
Unity global RotXYZ column. But
Expected rotation is what it should be.
Edit: Here is a poorly drawn image of what I'm seeing when I export from Blender to Unity.
Edit: I'm seeing inside
fbx_utils.py (FBX exporter) that the camera gets rotated to have +X be the camera's forward direction.