Apply standard rotation on object


I imported an object from Blender, and since blender uses Z as a vertical axis, I had to rotate the gameobject -90 degrees. But now my calculations for adding height to the object along the y-axis becomes incorrect since that will be applied sideways.

So my question is:

Can I somehow apply the rotation as a standard for the object and get Y as up axis for it?

You could:

  • Try to set this in model import settings. I remember it having an option to swap Y and Z axes or rotate the object, but I don’t remember it ever working satisfactorily.
  • Accept the fate, and simply place the model as a child object of your main logical GameObject, do the rotation there and do all the calculations in the parent’s space / place other chidren as children of the main gameObject, not the rotated model one
  • Write your own ModelImporter or Asset PostProcessor that does the transformation… considering this would have to transform the mesh vertices, tangents and normals, animations, child positions and orientations, and possibly a lot of other things I didn’t think about, this might or might not be an easy task, can’t guess.
  • Rotate the model in Blender, so that it imports correctly in Unity. Or, possibly, find a blender FBX export option that toes that for you. Or, find some blender->Unity plugin that does that for you.
  • Write a feature request to Unity

Ok yeah, I think I’ll re-import my models from Blender, lesson learned, but it is something I think should be a feature in Unity.