The Obj parser reverses the materials. This is a known bug -- does
anyone know how to fix it?
I tried editing Obj.as's function, prepareData(), and I could reverse
the material, but the geometry is backwards.
I changed:
_geometryData.uvs.push(new
UV(parseFloat(trunk[1]), parseFloat(trunk[2])));
To:
_geometryData.uvs.push(new UV(1-
parseFloat(trunk[1]), parseFloat(trunk[2])));
And I think I need to modify this line, but I'm not sure how:
_geometryData.vertices.push(_vertex = new
Vertex(-parseFloat(trunk[1]) * scaling, parseFloat(trunk[2]) *
scaling, -parseFloat(trunk[3]) * scaling));
I believe I am supposed to swap the first two parameters of Vertex,
but the geometry gets screwed up:
_geometryData.vertices.push(_vertex = new
Vertex(parseFloat(trunk[2]) * scaling, -parseFloat(trunk[1]) *
scaling, -parseFloat(trunk[3]) * scaling));
Any help appreciated! Thanks
William