I am using OrbitControls and I want to position the camera and the point it is looking at.
I adjust my camera Y position to move it up whilst keeping the camera lookAt and the controls target pointed at the middle of my object. In the Fiddle I made (Edit fiddle - JSFiddle - Code Playground) adjusting the camera Y appears to move the object further away
I’m sure I have made a typo somewhere - can someone point out my error or mistaken assumption?
The problem is, in you case, when you change the camera height, independently of controls, it also changes polar angle and things will not work correctly if the angle goes outside the range that controls supposed to handle.
I’m not sure what is the reason to use both GUI and controls at the same time.
You could do your own calculations and restrict GUI, so it doesn’t produce angles outside a certain range or set angles instead of heights and sync with orbit controls settings but that sounds too complex, maybe there is an easier way to do what you are trying to.