How to make a smash bros-like camera

I have been making a multiplayer game with the camera focusing on everyone on the screen. Just like smash bros, the camera focuses on the center of all of the characters positions while zooming to keep the players viewable.

My only problem is the zooming with an orthographic camera. So, is there anyone who knows how to zoom the camera to keep the players in view?
(Sample Code would be nice)

@GaborV
unity 5 answer using a perspective cam

using System.Collections.Generic;
using UnityEngine;
using System.Linq;

namespace Assets.Scripts.Player
{
    public class PlayerCam : MonoBehaviour
    {
        private new Transform transform;
        private Vector3 DesiredPos;
        public List<Transform> Players;
        public float camSpeed;
        private Camera cam;
        void Awake()
        {
            transform = GetComponent<Transform>();
            cam = GetComponent<Camera>();            
        }

        private void Start()
        {
            var p = GameObject.FindGameObjectsWithTag("Player");
            Players = new List<Transform>();
            for (int i = 0; i < p.Length; i++)
            {
                Players.Add(p*.GetComponent<Transform>());*

}
}

void Update()
{
if (Players.Count <= 0)//early out if no players have been found
return;
DesiredPos = Vector3.zero;
float distance = 0f;
var hSort = Players.OrderByDescending(p => p.position.y);
var wSort = Players.OrderByDescending(p => p.position.x);
var mHeight = hSort.First().position.y - hSort.Last().position.y;
var mWidth = wSort.First().position.x - wSort.Last().position.x;
var distanceH = -(mHeight + 5f) * 0.5f / Mathf.Tan(cam.fieldOfView * 0.5f * Mathf.Deg2Rad);
var distanceW = -(mWidth / cam.aspect + 5f) * 0.5f / Mathf.Tan(cam.fieldOfView * 0.5f * Mathf.Deg2Rad);
distance = distanceH < distanceW ? distanceH : distanceW;

for (int i = 0; i < Players.Count; i++)
{
DesiredPos += Players*.position;*
}
if (distance > -10f) distance = -10f;
DesiredPos /= Players.Count;
DesiredPos.z = distance;
}

void LateUpdate()
{
transform.position = Vector3.MoveTowards(transform.position, DesiredPos, camSpeed);
}
}
}

You can zoom the orthographic camera by adjusting it’s orthographic size . As for the positions , you can iterate through the positions of all the players and get the Rect in which they are all displayed (the topmost and lowest y , the leftmost and rightmost x ) , and center the camera to look at that rect.

Sorry about me taking a while to say thanks for the help. I’m just going to post this for everyone to view.

Thanks to CodinRonin and alucardj.

// Update is called once per frame void Update() {

CalculateBounds();

CalculateCameraPosAndSize();

}

void CalculateBounds() {
minX = Mathf.Infinity;
maxX = -Mathf.Infinity;
minY = Mathf.Infinity;
maxY = -Mathf.Infinity;

players = GameObject.FindGameObjectsWithTag("Player");

foreach (GameObject player in players){

   Vector3 tempPlayer = player.transform.position;

   //X Bounds
   if (tempPlayer.x < minX)
     minX = tempPlayer.x;

   if (tempPlayer.x > maxX)
     maxX = tempPlayer.x;

   //Y Bounds
   if (tempPlayer.y < minY)
     minY = tempPlayer.y;

   if (tempPlayer.y > maxY)
     maxY = tempPlayer.y;
}

}

void CalculateCameraPosAndSize() {
//Position
Vector3 cameraCenter = Vector3.zero;

foreach(GameObject player in players){
   cameraCenter += player.transform.position;
}

Vector3 finalCameraCenter = cameraCenter / players.Length;

//Rotates and Positions camera around a point
rot = Quaternion.Euler(angles);
pos = rot * new Vector3(0f, 0f, -camDist) + finalCameraCenter; 

transform.rotation = rot;
transform.position = Vector3.Lerp(transform.position, pos, camSpeed * Time.deltaTime);

finalLookAt = Vector3.Lerp (finalLookAt, finalCameraCenter, camSpeed * Time.deltaTime);

transform.LookAt(finalLookAt);

//Size
float sizeX = maxX - minX + cameraBuffer.x;
float sizeY = maxY - minY + cameraBuffer.y;

camSize = (sizeX > sizeY ? sizeX : sizeY);

camera.orthographicSize = camSize * 0.5f;

}