Hi, I can’t figure out how can I can add individual meshes to the scene (loaded with the SceneLoader)
If I use the container.addAllToScene();, It also adds some lights that I don’t want to add.
I tried setting a parent object that is already in the scene, but the object does not appear.
Isn’t there something like, scene.addChild(mesh) ?
Here is an example of my code
var pivot = new BABYLON.TransformNode("root");
var loader=BABYLON.SceneLoader.LoadAssetContainer("./models/", "teapot.babylon", scene,
function (container) {
var meshes = container.meshes;
var materials = container.materials;
for (var i=0;i<meshes.length;i++){
meshes[i].setParent(pivot);
}
});