Why does unity obj import flip my x coordinate?
- by milkplus
When I import my wavefront obj model into unity and then draw lines over it with the same coordinates in the obj file, the x coordinate is negated.
I don't see any option in the importer that might be doing that. And I'm using the same localToWorldMatrix and the same coordinate data in the .obj file. Hmmm
GL.PushMatrix();
GL.MultMatrix(transform.localToWorldMatrix);
CreateMaterial();
lineMaterial.SetPass(0);
GL.Color(new Color(0, 1, 0));
GL.Begin(GL.LINES);
GL.Vertex(p1);
GL.Vertex(p2);
GL.Vertex(p2);
GL.Vertex(p3);
//...
GL.End();
GL.PopMatrix();