Hi, i tried using a 3d model, but it seems like it is not being loaded in the scene? Can someone help?
This can happen for so many reasons. Scaling would be one of them. Camera position could be one as well. There are many other reasons!
If you can reproduce that on the playground I am sure we can find a solution very fast
How do i load mylocal file in playground?
Has your question been answered?
In short, the answer to ‘how do I load local files in the PG?’ is: You don’t
In fact, you have two choices:
plese have a look at it here - https://playground.babylonjs.com/#FPXQNR#1
i used the same code in my project… but its not loading…
Even in the playground… its taking 30 sec to load
Line 7 indicates Path
Line 8 indicates File
line 7: “https://dl.dropbox.com/s/nuj30po6nyyic8o/”, //PATH
line 8: “linde_l12_ac_body.gltf”, //FILE
Seems to be working as expected:
Sure, it seems to be… but cant find the scaling,position property. How can i fix that?/
When i console the mesh, i cant find them
Seems to work as expected as well:
Have you read this doc page(s)?
Yes, i did… little confused with variouse loading functions… APpend, load, importMesh etc,
Screenshot doesnt have these much arrays. Im loading it from the local
It does feel like both scenes and the functions you are using are different. I assume you are using the Load function and not the ImportMesh function, as the first variable you are getting is the scene and not the meshes. You can always use
scene.meshes in the success callback, or work the same as the example in the playground which will provide you the meshes you are expecting to see.
Well, they all have a use and you should may be start with reading this section of the doc and eventually watch a couple of videos. There are in fact more of these such as ‘async’ and relying on promise. I know it’s a bit hard in the beginning but in the end, you’ll find all of these to be very useful in a project.
I’m afraid to say ‘scaling’ is just ‘scaling’ as in:
mymesh.scaling = new BABYLON.Vector3(0.5, 0.5, 0.5);
If you did it like this and does not apply to your mesh, then I’d say it’s likely that you did not select the mesh correctly (select the correct mesh).
Im using append method because, im calling the 3d obj from local… not from the dropbox
I was confused with the first and second variable. Thank you for clearing it
That doesn’t matter. You can still use importMesh even in a local environment (as far as I know).
Please correct me if I’m wrong.