Hello,
I have a house.obj file made in Google Sketchup and exported via TIG’s OBJExporter. Everything works fine but the textures are not being scaled as they should. What’s causing the problem is the exporter or I should fix it in Away3D?
Here’s my code:
[Embed(source="house.obj", mimeType="application/octet-stream")]
private var HouseMesh:Class;
private var houseMesh:Mesh;
...
Parsers.enableAllBundled();
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
AssetLibrary.loadData(new HouseMesh());
...
private function onAssetComplete(event:AssetEvent):void
{
if (event.asset.assetType == AssetType.MESH)
{
houseMesh = event.asset as Mesh;
houseMesh.geometry.scale(100);
houseMesh.y = -50;
houseMesh.rotationY = 180;
scene.addChild(houseMesh);
}
}