Hi for all, i have this situation, do not know why
my code for that material:
function Nave(name, textureMat){
this.name = name;
//after by constructor add the mes from .obj file.
this.mesh ={};
this.material= new BABYLON.StandardMaterial(this.name+"_material", scene);
this.material.diffuseColor = new BABYLON.Color3(0.8, 0.8, 0.8);
this.material.specularColor = new BABYLON.Color3(0.05, 0.05, 0.05);
this.material.invertU = -1;
if(textureMat != null){
this.material.diffuseTexture = new BABYLON.Texture("texturas/"+textureMat, scene);
}
//......
}
//in load of .obj file
BABYLON.SceneLoader.ImportMesh("","", "naveTierraSolo.obj", scene, function (meshes) {
naves[0].mesh=meshes[0];
carga.cargados +=1;
naves[0].mesh.material = naves[0].material;
//...
});
naves[0] = new Nave("shipPlayer", "naveTierraSolo.png");