EdyJ / blender-to-unity-fbx-exporter

FBX exporter addon for Blender compatible with Unity's coordinate and scaling system.
MIT License
947 stars 98 forks source link

objects exports with wrong rotation #30

Closed Mornedil closed 1 year ago

Mornedil commented 1 year ago

Object in blender at rotation 0,0,0 is facing -Y with +X to it's left. When imported to unity, object at rotation 0,0,0 is facing +Z with -X to it's left. (rotation difference of 180 degrees on the up-axis)

The object in blender has position/rotation/scale all applied so they're at 0,0,0 for pos/rot and 1,1,1 for scale

Mornedil commented 1 year ago

There is a unity import setting that fixes this - Bake Axis Conversion. It's off by default, turning it on fixes orientation

EdyJ commented 1 year ago

This is intended. Blender defines the "front" direction as -Y, while Unity defines "front" as +Z. Therefore, in both cases the object is facing "front".

EdyJ commented 1 year ago

Theoretically, the option "Bake Axis Conversion" in Unity fixes the FBX so the default FBX exporter could be used instead of this. I haven't tested this option though.