Rotate & Translate Camera to Focus on Object

The following approach should solve the issue: Need help with gsap camera and OrbitControls animations - #2 by Mugen87

There is also a live example that demonstrates the solution by animating a camera with GSAP.

BTW: The title of your post is not correct. You don’t want to just rotate the camera. You actually need tranlate + rotate similar to an orbital movement.

One simple approach that might help is to determine the view direction of your camera first. If the target object is occluded, you might want to negate the view direction and then offset the camera from the target’s position. In this way you basically mirror the camera (or change sides).