How to limit movement of camera by some geometry?

I want my mesh instead of box, how to do that?

Here an example : https://www.babylonjs-playground.com/#MV90AQ#1

I want to import, and limit camera by .gltf mesh!?How to do that?

Well did you check @Vinc3r answer? This is exactly what he did for you

Yes I know, but Im not experienced in this field, and I`d like to see how you will write this code in case if you want to insert gltf. mesh.

When I copied the name wall.gltf instead of existed glb. it doesnt work, in this way I`m trying to figure out what mistake I did…

Can you create a PG that shows what doesn’t work? GLB is a packed up version of the glTF and its external references.

This is my code:

This is sample:

It’s hard to help without a PG. Please give us a link to the PG so we can help.

I`m not sure what does it mean PG, but here my sample https://www.babylonjs-playground.com/#LY7HSB#5

Instead of box, Id like to insert my .gltf mesh…

1337 BJS langage spotted, PG = PlayGround :nerd_face:

As I shown you above, you can import any gltf/glb file like here… https://www.babylonjs-playground.com/#MV90AQ#1

In the PG you’ve made, you’re using the url "./", so, unless your file is at the root of https://www.babylonjs-playground.com ftp, the browser will not find the file.

A good practice in web dev is also to check the console :wink:

You see this mistakes because you don`t have files that are situated on my localhost.

About sample: I really don`t understand how to import my mesh using this sample,I copied the name of my mesh instead of old and it doesnt work.

I have this mesh on my local host, and Id like to find the solution using this url “./”, could you help me with that?

Doc about how to use exterrnal assets in the Playground (PG): Using External Assets - Babylon.js Documentation

Wha is this link, where should I find it?

well this is in the Doc page. you have to store your asset on github and then go to jsdeliver to get the url

Where is detailed tutorial of how to do that?

Well look on google for tutorial about GitHub :slight_smile:
Once on github you can use jsdeliver to create a link to your asset in order to use in the playground

We do not host content on the playground because of the expensive cost of storing user assets

Why I can`t do that through my local host?

The goal is for us to help you right? So we need to see what is going wrong with your code because even with ALL the examples we already gave you you are still not able to proceed.

So as for obvious reasons we cannot see your localhost we need your assets to be online somewhere so you can reproduce your code with your assets on the playground

1 Like

Iv just uploaded files on my github, I have a link, where should I paste this link?