My motive is to replace the mesh which is imported from a GLTF file.
Everything works except for position.
The position of imported mesh is not same as that of the mesh that existed.
this is the orignal scene. I want to replace sink.
this is the imported mesh.
I tried using get and set absolute positions too.
Here’s the code:
var importedmeshposition = mesh3.getAbsolutePosition();
const resultPromise = BABYLON.SceneLoader.ImportMeshAsync("", meshobject.Filesrc, meshobject.Filename, scene);
// Result has meshes, particleSystems, skeletons, animationGroups and transformNodes
resultPromise.then((result) => {
mesh3.dispose();
importedmesh2 = result.meshes[0];
importedmesh2.setAbsolutePosition(importedmeshposition);
// importedmesh2.position = importedmeshposition;
});