Yes, of course
You’re welcome!
This is wrong:
This works:
The first parameter is the path and the second one is the filename without slashes.
EDIT: just the filename, so for example yacht.glb
When you hover with the mouse over here you can see the available parameters. Isn’t this the case with your IDE?
Hey, thanks that helped! The models are now loading, but nothing is displayed, wheter models or textures. Do you may know the issue? I getting no error…
I bet you’re not adding them to the scene. Let me have a look after I finish smoking
Yes you do. But it seems that you are overengineering mesh loading quite a lot. You can use Load, Append, ImportMesh instead of LoadAssetContainer. Read here. Look at the playgrounds. Inspire yourself
The other thing, now there is no sky, no hex world, what happened? Try to fix it I have to leave now for a few hours.
I made some hacks to make it working, but:
-
you don’t resize your canvas so it was always 300x150 (or something like that). Adding these two lines will fix it, but not permanently:
-
you never set
this.world.player
here sothis.scene.render()
never get called.
You don’t need the lines 94-96 as well.
Remove all the lines marked by red.
And add this one:
Your scene will start to render.
-
Make the meshes bigger by scaling them and resolve the promise if all is ok.
-
this function permanently crashes because
this._mesh
is not set and you try to access it’s properties in this function. So just a hack to make it running, add this:
-
the initial positions
z
value is at zero and the ground too. The ships zero is somewhere in their middle so they are cut so modify thez
values, again just to make them visible:
-
this observer was crashing because
this.player
is not set. Again a quick hack to make it show something on the screen:
That’s all!
Good luck and happy coding!
Hi Roland,
I have apply you fixes and it works again! Thanks a lot! They is just a minor bug left: It loads 4 times the same model instead of differents, also the player is not found(?), therefore they is nore movement
here a screenshot:
I have pushed my changes to the alpha branch!
Sorry, I am on vacation without a PC. I can only suggest you to use the debugger to debug your code.
It will be really hard to say without a simple repro in the playground.