Hello everyone! I am trying to implement a load function on my room builder tool. I managed to load it but I am unable to interact with the meshes even though the meshes already have actions programmed on it.
Below is the code that I use. You can ignore the else part. Is there a reason why I am unable to interact with the meshes ? Thank you for your help!
var loadNotif = confirm("Do you want to load?");
if(loadNotif == true){
// get the canvas DOM element
console.log("loadNotif is true");
var canvas = document.getElementById('renderCanvas');
var engine = new BABYLON.Engine(canvas, true);
BABYLON.SceneLoader.Load("https://dl.dropbox.com/s/8y4mjxww03t7kf0/", "testScene.babylon", engine, function (newScene){
console.log(newScene);
newScene.activeCamera.attachControl(canvas);
engine.runRenderLoop(function(){
newScene.render();
})
})
window.addEventListener('resize', function(){
engine.resize();
});
}else{
var app = new App();
app.init(null);
app.engine.runRenderLoop(function(){
app.scene.render();
});
window.addEventListener('resize', function(){
app.engine.resize();
});
}```
Hi aWeirdo! Yes each of the mesh in the scene that I’m trying to load has use actions programmed to it. I currently do not have a live sample working but I see if I can somehow reproduce it in the playground
I have somewhat recreated the tool that I am trying to build onto the playground. Before the tool instantiates, the above code runs and if the user chooses to load, the program will run the scene that I uploaded onto dropbox. Else, it will redirect the user to the tool with nothing on it so that the user can commence building. I don’t know if it helps but do let me know if there is anything further that you need to know! Oh and please run it on Chrome:)