What I want to achieve is to be able to zoom the camera using the mouse wheel to where my mouse is. Think of it more like how 3ds max does this. The camera zooms into the point where the mouse is and there are no jerks or snaps.
This is my current implementation but this assumes the target is in the center. If I move the target position the camera snaps to that position and basically brings it to the center.
targetDist -= Input.GetAxis("Mouse ScrollWheel") * zoomSpeed * 0.5f * (isOrtho ? 15f : 1f);
targetDist = Mathf.Max(0.1f,targetDist);
distance = moveSmoothing * targetDist + (1-moveSmoothing )*distance;
transform.localRotation = Quaternion.Slerp( transform.localRotation, targetRot, rotateSmoothing * deltaTimeFactor );
target.position = Vector3.Lerp(target.position, targetLookAt, moveSmoothing * deltaTimeFactor);
distanceVec.z = distance;
transform.position = target.position - transform.rotation * distanceVec;
Any thoughts?