Renaming "__root__" for positioning

So here is a great way to load multiple glb files and position them

BABYLON.SceneLoader.ImportMeshAsync(null, ‘/assets/’, ‘congratulations.glb’, scene).then(results => {
var root = results.meshes[0];
root.name = ‘xyz3’;
root.id = ‘xyz3’;
root.rotation.y = Math.PI; // we’re backwards in import

    root.position = new BABYLON.Vector3(0, 250, 0);
});
3 Likes