Controls.target and camera.position distance

Hi,
I use “orbitcontrols” with “perspective camera”. I “controls.screenSpacePanning = false;” I set the
The distance between “controls.target” and “camera.position” is 25.
When I move the camera with right mouse click, the controls.target moves with the camera and the distance doesn’t change as expected.
How can I force the distance between controls.target and camera.position to always be a specific number? That is, how can I specify that if the distance is less than the specified value, change it and return it to the same initial value?

Are you referring to controls.minDistance and controls.maxDistance?

1 Like

That’s right.