NablaT Posted February 5, 2016 Share Posted February 5, 2016 Hello everybody, I have a problem with the function importMesh. I have a babylon file mades with bendler and I would like to import this component into my scene in order to be able to rotate this element. When I just Load the element with (BABYLON.SceneLoader.Load), it's working well. However, when I'm using importMesh nothing happens, I don't even have an error (just an error which says myfile.babylon.material is not found but I read this error could appear from my browser). I don't know how to fix this problem. Does anyone have an idea? I have exported my files from my project if you would like to look it. Thank you for your help. demo.zip Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 5, 2016 Share Posted February 5, 2016 Hi, It works fine for me. Your textures are missing though; Here is the playground : http://www.babylonjs-playground.com/#1QYBFG#0 Quote Link to comment Share on other sites More sharing options...
satguru Posted February 5, 2016 Share Posted February 5, 2016 Looks like you are not rendering your scene with "BABYLON.SceneLoader.Load" Just like you have added a Scene.render() in your "BABYLON.SceneLoader.Load", you need to add one to your "BABYLON.SceneLoader.ImportMesh" too. Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 8, 2016 Share Posted February 8, 2016 On 2/5/2016 at 8:56 PM, satguru said: Looks like you are not rendering your scene with "BABYLON.SceneLoader.Load" Just like you have added a Scene.render() in your "BABYLON.SceneLoader.Load", you need to add one to your "BABYLON.SceneLoader.ImportMesh" too. Hey @satguru, not sure what you are referring to here? @NablaT - What version of Babylon did you try? have you tried with the latest 2.3? Quote Link to comment Share on other sites More sharing options...
satguru Posted February 8, 2016 Share Posted February 8, 2016 Hi @RaananW When I was looking at NablaT's code (swingGuide.js) I noticed that the portion he mentioned worked successfully (and which was commented out) had the runRenderLoop in it. The one he was trying to execute unsuccessfully did not have the runRenderLoop. So I thought maybe that was the problem. Quote Link to comment Share on other sites More sharing options...
NablaT Posted February 10, 2016 Author Share Posted February 10, 2016 Thank you guys for all of your answers ! I had a complicated week, I can't answer before now @satguru I just try to add a scene.render in my code, and right the babylon background appears (you can check the attachment swingguide). However I haven't my 3D model ... @RaananW I just updated my version to 2.3 but that doesn't change.. I have always the same error with the manifest (in attachment). Thank you again for your help. Quote Link to comment Share on other sites More sharing options...
NablaT Posted February 10, 2016 Author Share Posted February 10, 2016 @Temechon Yes I really don't why my code isn't working in my project. I'm sure the problem come from the manifest. But if I try with the dropbox link in the playground, I have exactly the same error Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 10, 2016 Share Posted February 10, 2016 The manifest error is not a problem. can you check if your webserver serve .babylon MIME type? Quote Link to comment Share on other sites More sharing options...
NablaT Posted February 10, 2016 Author Share Posted February 10, 2016 Yeah sure but I don't know how to do that .. Can you explain me? Quote Link to comment Share on other sites More sharing options...
NablaT Posted February 10, 2016 Author Share Posted February 10, 2016 Finally I find a solution to achieve my rotation goal. I used the code who works (the one I need to give rotation to my model so I use the part with BABYLON.SceneLoader.Load and apply rotation to the meshes with Scene.meshes.rotation. So for my goal it's perfect However I still have problems with the other part of my code. It will stay a mystery Thank you all for your answers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.