- Home /
Import Blender Mesh
When I import my blender model into Unity, the model imports correctly, but the mesh seems to be sideways.
I did a test of this by placing gizmos on all the vertices of the object like this:
 public class Creator : MonoBehaviour {
     public Vector3[] vertices;
     public Mesh mesh;
     void OnDrawGizmosSelected() {
         mesh = GetComponent<MeshFilter>().sharedMesh;
         if (vertices == null || vertices.Length == 0) {
             vertices = mesh.vertices;
         } else {
             mesh.vertices = vertices;
         }
         Vector3 lp = transform.position;
         foreach (Vector3 v in vertices) {
             Vector3 p = lp - v;
             Gizmos.color = Color.yellow;
             Gizmos.DrawCube(p, new Vector3(0.02f, 0.02f, 0.02f));
         }
         mesh.RecalculateBounds();
     }
 }
It gives me this output in the editor:

Is there something that I can do so that mesh isn't sideways like that?
Answer by Baste · May 04, 2015 at 10:09 PM
This is a weirdness to how Unity imports stuff. The axis system in Unity and Blender are different -where Unity has x forward, Blender has z forward.
Unity has solved this by just setting the x-rotation to -90 and calling it a day. You can get by with that, but if you want a fix, people have made one.
This helped me fix the issue too:
 Gizmos.DrawCube(new Vector3(p.x, -p.z, p.y), new Vector3(0.02f, 0.02f, 0.02f));
Your answer
 
 
             Follow this Question
Related Questions
Why are there little white dots in my mesh? 1 Answer
Blender could not convert the .blend file to fbx file Unity 2019.1.0 9 Answers
What's the best way to edit the mesh in an .fbx file I didn't create? 1 Answer
Blender export not working as node use shader fbx 0 Answers
Editing a mesh in an FBX file 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                