Last bit of camera help with zoom, rotate and follow player functionality

Hey guys… So I’ve already implemented most of the functionality here…
I just don’t understand how to make the camera follow my character without the zoom working incorrectly.

Camera following my character:
When I tried to adopt the traditional “camera follow” method (what I’ve commented out) the zoom no longer worked properly. If I execute the line in update then my offset stays the same. Of course I understand I need to update this when I zoom but I’m not sure exactly how to incorporate it with the below addition I want to add to my script as well…

Zoom Based on rotate:
Well, essentially I use the middle mouse button to rotate around the camera. This works just how I want it. But my problem is that the camera zoom should be a vector that is pointing away from where it is currently facing.
So something like the negative value of this.transform.rotation???

Any help is immensely appreciated! Also, for any readers/future readers, feel free to use some of this code for your own camera.

using UnityEngine;
using System.Collections;

public class CameraController : MonoBehaviour
{
    private Vector3 offset;
    private Vector3 mouseOrigin;
    private bool isRotating;

    //public GameObject player;
    public float turnSpeed;
    public float zoomSpeed;
    private Vector3 currentPos;

    //void Start()
    //{
    //    offset = transform.position - player.transform.position;
    //}
    void Update()
    {
        //currentPos = transform.position + offset;
        if (Input.GetMouseButtonDown(2))
        {
            mouseOrigin = Input.mousePosition;
            isRotating = true;
        }
       
        if (!Input.GetMouseButton(2)) isRotating = false;

        if (isRotating)
        {
            Vector3 pos = Camera.main.ScreenToViewportPoint(Input.mousePosition - mouseOrigin);
            transform.RotateAround(transform.position, transform.right, -pos.y * turnSpeed);
            transform.RotateAround(transform.position, Vector3.up, pos.x * turnSpeed);
        }

        if (Input.GetAxis("Mouse ScrollWheel") > 0)
        {
            transform.position = new Vector3(transform.position.x, transform.position.y - zoomSpeed, transform.position.z + zoomSpeed);
           
        }

        if (Input.GetAxis("Mouse ScrollWheel") < 0)
        {
            transform.position = new Vector3(transform.position.x, transform.position.y + zoomSpeed, transform.position.z - zoomSpeed);
        }
    }
}

You need a boom cam, it makes this kind of camera setup a breeze.

Its essentially setup like this:

Camera Pivot->Camera

The pivot is what follows the player and the camera is a child of that pivot. The camera is always looking at the pivot. Zooming in and out is the camera’s distance to the pivot or its local z position which is relative to the pivot. Rotate the pivot to rotate the camera instead of the camera itself.

I tried to do what you are doing for a few days and gave up. I found out about a boom cam and never looked back.

Thanks for the advice - I could rig this up and it sounds like such a simple solution! THANK YOU!