Scene saving problem

I don’t know, the playground is a bit hard to understand. If you could simplify it, it will be carried to help. No colors, no shadows, just simple meshes

I upload the resources to git, and load my resources on PG, and an error will be reported, saying that the resources cannot be found. Why

That’s probably because the url you used is incorrect or the way you used to load it. Share a simple playground :blush:

wait fo

my PG https://www.babylonjs-playground.com/#MECK03#17

A bit of reading about github, raw git and CORS would get you here - https://www.babylonjs-playground.com/#MECK03#20

Please try simplifying your playgrounds. providing 1 asset to download is much simpler than a problem with 30. Always provide the minimum possible to understand the problem

sorry!I never seem to have used this link before Thank you very much:微笑:

Firstly this was the correct place to ask the question.

Secondly I am sorry that the documentation was not clear and you were not able to understand the page both Drigax and I pointed you to

Thirdly the PG you just included in Mesh adds bounding boxes - #60 by ranwei-001 does not help us to answer your problem.

My issue in answering your questions is unfortunately they are not simple enough for me to understand what you want. As I have said before you must break down your issues into much smaller ones. Putting your full project into the playground is not doing that.

sorry, I’m fixing it

If your next question is not about loading or saving models then use the most appropriate of the others you have already started.

ok ! My camera moves the target and now it’s done, but the model is hidden and I still can’t get it out
https://www.babylonjs-playground.com/#3M7Q1U#13


https://www.babylonjs-playground.com/#3M7Q1U#18
I did it the way you said, but I didn’t really understand what this was for

Hey!The way you said it, I tested it, and you asked me to have an array of data for a building, so if I have a lot of buildings, I can’t have a meshes array for every building, and that would be a big hassle

So simply do it the way you want to do it. That would be the best for you, I’m sure.

You have opened several threads and are getting help from several members of the community. Choose one, and try solving it before you continue the others.

  • In fact, no one replied to my question, so progress was zero
    I just read the code you gave me, but, which way you say, if there are fewer houses, you can still consider it, but the house is more, this way is not convenient, but I really have no good ideas. ,how to do

I now think of a way, if there is a building, I use a mesh array, the model of this building is saved, and then, when clicked, the loop is judged, when the model clicked is equivalent to one of the arrays. If you have multiple buildings in your scene, writing this is equivalent to saving each house with an array. I feel very troublesome, and if I don’t know what to do. When I load a lot of buildings, this method is not easy to use, so how should I solve it?

var meshs= {
build1: {
model: Mesh
floors: […]
},
build2: {
model: Mesh
floors: […]
}
}
// 根据一个floor取得对应的obj
getObject(floor) {
for(var i in meshs) if (floor.parent === meshs[i].model) return meshs[i];
}

// 改变整个楼层显示状态
setBuildingVisible(obj, v) {
obj.floors.forEach(f => f.visible = v);
}

点击函数里面。先根据点击的floor取得对应的obj
var obj = getObject(floor);
然后循环buildings,隐藏所有obj,然后把floor显示出来
for( var i in meshs) {
setBuildingVisible(meshs[i], false);
}
floor.visible = true;