VR City Demo, asset manager materials question

Hi y’all,

I am trying to work on a collection of “flashy” VR demos on glitch.com to help people in the arts/arts-gaming community get into babylonVR. I already have a good “empty space” demo: Glitch :・゚✧ . I am now working on a VR city demo.

I want to change all the buildings in this into wireframe, but for some reason, the way I am doing this is wrong, can I get some help: Glitch :・゚✧ (I start using the asset manager on line 115).

Somehow, I’ve actually solved this problem before in another demo, but for the life of me, I can’t see what I’m doing wrong in this demo; other eyes would probably help.

(I know the problem has nothing to do with VR, it’s just I will need some basics help, while I put all these demos together, and ship them out to the VR community).

and… I fixed it.

meshTask.onSuccess = function(task) {
          //console.log("hi");
          //console.log(loadedMeshes);
          
          
          
          var myMaterial = new BABYLON.StandardMaterial("myMaterial", scene);
          //myMaterial.emissiveColor = new BABYLON.Color3(1, 1, 1);
          myMaterial.wireframe = true;
          //myMaterial.alpha = 0.1;
          //for (var i = 0; i < task.loadedMeshes.length; i++) {
          //  task.loadedMeshes[i].material = myMaterial;
          //}
          task.loadedMeshes[0].material = myMaterial;
        };
1 Like