importing from blender, axis' wrong

I am attempting to import a custom plane from blender (as i need more verts than unity’s plane), however the axis are all scewed. My code takes the plane and resizes it to fit the level, the blender model thinks that Z is Y and so doesn’t resize in the z direction at all. I can do a quick fix by telling it to set the localscale.Y to the zscale calculated… but this seems wrong and dirty, i’d rather it actually knew which axis is which.

Yes i have trawled the internet for an age trying to find a fix to this and through the many similar posts not one answer actually works.

From all appearances fiddling with which axis is up and which is forward doesn’t change the axis at all, it just rotates it, I need the Y and Z axis to swap so the code recognizes dimentions properly.

First, take a look at the CreatePlane editor script from the Wiki. It will allow you create a plane horizontally or vertically with a specified resolution and size.

Alternately, you can use the editor script found in the following post to rotate your mesh.

http://answers.unity3d.com/questions/561786/how-to-export-obj-from-editor-with-rescaled-mesh.html

To use:

  • Save it in the Assets/Editor folder. The file must be named ‘RotateMesh’.
  • Orient and scale your object like you want it to be when the rotation is (0,0,0), and the scale is (1,1,1)
  • Select your object in the hierarchy and then select ‘RotateMesh’ from the Windows menu

This script creates a cloned copy with the mesh rotated.

I don’t use Blender, so I cannot give you specifics, but there are numerous posts (with answers) on how to get the rotation right when importing Blender objects.