After rotating the camera on z-axis and then calling the OrbitControls.update(), camera is reset to initial position.if I don’t call OrbitControls.update(), then after using mouse zoom or pan, camera again resets its rotation. How this can be solved
When using OrbitControls
, the transformation of the camera is managed by the controls. It’s not valid to modify it differently since it will interfere with the controls logic.
The best approach for such a use case is a custom enhancement based on OrbitControls
.
Try changing OrbitControls target instead
https://threejs.org/docs/#examples/en/controls/OrbitControls.target.