HELP NEEDED - Some features does not work properly

Hi all,

I have been heavily working on a project for months now. I am not a big expert of Babylon.JS but i am a fan and have been trying to learn as much as possible.

There are some features that I am not able to use. I would need someone to review the code with me and help me find the problem… I am too desperate at this moment in time.

Any help would be highly appreciated.

Adrián.

Hi @ADRIAN_92 and welcome to the forum. Could you isolate the section of code causing problems and reproduce in a playground?

Hello @JohnK, Thank you very much for welcoming me to the forum and thanks for your reply.

I have attached a picture :slight_smile:

Here we are for example in the “Air Room”, which has 2 doors inside, I have told him that if he collides with “door1” he takes me to another scene, and he does, and I have told him that if he collides with “door2” take me to a different scene, and it doesn’t

Thanks for your help

Adrián

No picture attached. You appear to be working with multiple scenes

Could you set up a playground with two boxes for the doors, a sphere for the player and two scenes one with a box and one with a cylinder and see if you can reproduce the problem.

Hi John,

I tried that in the past and worked, but then when I used that code in the structure (with multiple scenes) it didn´t…

So I used the same code and it works for some doors and it doesn´t. And then there doors that work and suddenly withour changing any code it stopped working.

I am a bit lost here.

Thanks for your help.

Adrián.

Do you have a live version anywhere?

1 Like

Hello @JohnK,

Yes, here : http://urbanart.marsalsans.es/

Also the other problem i have is that the textures take ages to load…Do u kindly know why ?

Adrián.

Wow, there is a lot of loading going on when switching scenes and there is too much code to wade through. I can only suggest you check that whatever the function is returning the currentScene is returning a scene. Other than that you will have to wait until someone with more time on their hands might feel like going through it.

The alternative is to try again with a playground with a simple scene of two boxes click on one to load the ‘dude’ in scene2 and the other to load the rabbit in scene3. If it works it should give you an idea where the bug is in the full code and if not give us a chance to see what might be wrong.

https://doc.babylonjs.com/resources/meshes_to_load

2 Likes