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 :

If you pan the camera like demonstrated in the video, you modify, 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 Otherwise the controls get out of sync with the camera.

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

Thank you. It works well.