To do this you'll want to use a routine that runs every frame, like Update, LateUpdate, or a coroutine, so you can adjust the camera's position repeatedly.
You'll also want to store information about where you're supposed to be looking so you can keep turning towards it (particularly if you want to use this to follow a moving object)
Here's one way to do it:
// Cache the target we're supposed to look at.
public void LookAt(Transform target)
_lookTarget = target;
// LateUpdate so it runs after any scripts/animation
// that might move _lookTarget this frame.
if(_lookTarget != null)
Transform camera = Camera.main.transform;
Vector3 toTarget = _lookTarget.position - camera.position;
// This constructs a rotation looking in the direction of our target,
Quaternion targetRotation = Quaternion.LookRotation(toTarget);
// This blends the target rotation in gradually.
// Keep sharpness between 0 and 1 - lower values are slower/softer.
float sharpness = 0.1f;
camera.rotation = Quaternion.Lerp(camera.rotation, targetRotation, sharpness);
// This gives an "stretchy" damping where it moves fast when far
// away and slows down as it gets closer. You can also use
// Quaternion.RotateTowards() to get a more consistent speed.