In BJS3, the code below would load a gltf file and then translate and rotate all of the meshes in the file. After upgrading to BJS4 (4.0.3) the meshes are translated but not rotated.
As a diagnostic test, the code below console.logs the mesh objects before and after the translate/rotate operations are performed allowing inspection of the objects in the debugger to confirm that the .position properties of the meshes are modified by the .locallyTranslate() call but the .rotation properties of the meshes are not modified by the rotate() call.
Also, this is my first post on the forums here so hopefully I’m guessing at how do do code formatting correctly here, there doesn’t seem to be a way to preview the markdown before posting which is odd.
SceneLoader.ImportMeshAsync(null, this.mRootUrl, this.mFilename, scene, (progressEvent) => {
console.log("loading mesh"); // progressEvent);
})
.then((imported) => {
console.log("model loaded");
imported.meshes.forEach((mesh) => {
console.log("processing mesh");
console.log(mesh);
mesh.locallyTranslate(new Vector3(10, 10, 10));
mesh.rotate(Vector3.Right(), -1.57);
console.log(mesh);
console.log("done procesing");
});
})
.catch((reason) => {
throw reason;
});