Jump to content

Import mesh problem


NablaT
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

error babylon.PNG

swingguide.png

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...