Hi all,
I am not sure if this question should go here or in questions. I hope someone can move it, if appropriate.
I am trying to develop a custom 3D map for a TTRPG campaign. I am still at the very start of everything. With some help from AI and the internet, I have figured out the basic steps to set up my skybox and place some models in it. I also have added some functionality for moving the camera onto an object when it is clicked. All in all, most of the stuff I want to do works in principle.
However, as soon as I try to use an external model, things go wrong. I use the system locally, hosting a server with http-server in the root directory of the project.
I use an asset manager to load the corresponding files and add functionality to the meshes once they are loaded. However, no matter how simple the mesh, the whole thing freezes for a short while when trying to render the imported mesh (.glb file). This means if the mesh is not visible in the initial view of the camera upon loading, then everything works fine until the camera is panned onto where the imported model is supposed to be. Then, everything freezes, and it takes quite a while for the model to show.
I have tried to replicate my code in a babylon.js playground, but it didn’t work properly. This is probably already a bad sign. However, here is a GitHub repository with my code so far:
I know the code is kind of a mess, but I would still be grateful for help with the current problem and maybe also general recommendations since I am new to Babylon.js and 3D modeling in general.
Thanks in advance,
Najaye