Hello, I have loaded a glTF model and it contains a camera. The camera has matrix and matrixWorld which are different from each other. I want to assign my initialized PerspectiveCamera’s matrices with those two matrices so the PerspectiveCamera put in the place of imported camera. I can set my PerspectiveCamera’s matrix to the imported camera’s matrix. But it seems that the matrixWorld of the perspective camera is copied from the matrix and cannot be assigned. is there a way to do so? Maybe there is a workaround, and someone can guide me to a right direction!
perspectiveCamera.matrixAutoUpdate = false;
perspectiveCamera.matrix.set(...gltf.scene.children[0].matrix.elements); //does change the PerspectiveCamera's matrix
perspectiveCamera.matrixWorld.set(...gltf.scene.children[0].matrixWorld.elements); //does not change the PerspectiveCamera's matrixWorld