Quaternion.LookRotation returning bad rotations

I’m working on a simple camera script that is designed to focus on the centerpoint between two objects. When I attach the script to my camera and hit play, the rotation isn’t looking at the midpoint like it should, instead focusing on some random point in space.

public class FocusCamera : MonoBehaviour
{
	
	public Transform firstTarget = null;
	public Transform secondTarget = null;
	public float cameraRotationSpeed = 5.0F;
	
	private Quaternion currentCamRotation;
	private Quaternion midpointCamRotation;
	
	void Start()
	{
		
	}

	void Update()
	{
		currentCamRotation = transform.rotation;
		
		Vector3 midPoint = 0.5F * (firstTarget.position + secondTarget.position);
		midpointCamRotation = Quaternion.LookRotation(midPoint);
	}
	
	void LateUpdate()
	{
		transform.rotation = Quaternion.Slerp(currentCamRotation, midpointCamRotation, Time.deltaTime * cameraRotationSpeed);	
	}
}

I’ve managed to isolate the problem to the Quaternion.LookRotation function but I don’t know why it would be returning incorrect rotations (I’ve used it before in similar ways without issue). I’ve played with the up hint vector to no avail as well. Is there something that I’m just not seeing here?

You need to subtract out the position of the camera to get a vector between the camera and the place you want it to look:

Vector3 midPoint = 0.5F * (firstTarget.position + secondTarget.position) - transform.position;