Weird after the camera moves

Hi, I made a codepen example.

Keydown “L”: call TestCameraMove function.

It’s okay when I first operate the TestCameraMove function,
but when I control the mouse and call the TestCameraMove function again, the screen distorted.

what is wrong?Thank you.

example : https://codepen.io/Novice_/pen/GRqPPxN

If you pan the camera like demonstrated in the video, you modify OrbitControls.target, the focus point of the controls. If you now manually animate the camera and so it moves to a specific target and looks at a new focus point (the origin), you also have to update OrbitControls.target. Otherwise the controls get out of sync with the camera.

To fix this, add the following line at the end of your TestCameraMove1() function.

controls.target.set(0, 0, 0);

awesome,
Thank you. It works well.