I implemented this piece of code in my camera script, and it works fine, but how can I make a min - max zoom setting, and how can I make it that when I zoom in, it zooms in just a little bit further, like a zoom fade in and fade out. It needs to be smooth. Thank you!
using UnityEngine;
using System.Collections;
public class Zoom : MonoBehaviour {
public float zoomSpeed = 20;
void Update ()
{
float scroll = Input.GetAxis("Mouse ScrollWheel");
if (scroll != 0.0f)
{
camera.fieldOfView -= scroll*zoomSpeed;
}
}
}