Reset position after orbitting and zooming

Hello, how to reset the position of orbit and zoom? i tried to add eventlistener to controls like this

this.controls = new OrbitControls()

to listen to any changes for the controls, but the thing is zoom and position apparently not changed, so idk what is the current camera position. can anyone help?

my reference, i want to reset the camera rotation, position and zoom on a certain cases

With the following, you should see the changes:

this.controls = new OrbitControls( camera, renderer.domElement );
this.controls.addEventListener('change', (e) => {
    console.log(camera.position) // you will see the changes

To reset the camera, reposition your camera, then call this.controls.update()

From OrbitControls official Code example

controls.update() must be called after any manual changes to the camera’s transform
camera.position.set( 0, 20, 100 );

the position didn’t change, and after i add this.controls.saveState() it’s changing on change event.
the goal is to reset the camera position after user pan, rotate, zoom. I want to reset the camera position if user is idle and when user zoom out to max distance.

Reset after idle for couple second is working, the question is how to know if user zoom out to max distance? i’ve tried logging the but can’t really tell if user has reach the max distance or not. do u know?

oh nvm, i found getDistance() method

semi-related, its weird how OrbitControls has so little data in its onchange event, like rotation or zoom direction.
That might make some of these things so much easier.

hmm not sure about this but it’s the first time i use change event on OrbitControls, and so far i got what i needed