I have an application that works in several modes. For each mode I need to use different environment maps, which forces me to use different Scenes as well. However, it is important that I use the same renderer, because I need to draw on the same canvas. When I switch from the first mode to the second it works well. But when I switch back
model.rotation.set(x,y,z) stops having any effects and the model stops rotating as I need. I know that the question is a bit generic, but maybe you can suggest what I should pay attention at to resolve the issue? What could it be?
Update: Even updating Matrix doesn’t help:
const rotationMatrix = new THREE.Matrix4().makeRotationFromEuler( new Euler( initialObjectRotation.x + preset.rotation!.x, initialObjectRotation.y + preset.rotation!.y, initialObjectRotation.z + preset.rotation!.z ) ); renderingObject!.matrix.set(...rotationMatrix.transpose().toArray()); renderingObject!.updateMatrix();
Camera moves, Orbit controls continues to work, but the model refuses to rotate.