Input + Camera Movement

I wrote a script to move the camera via the keyboard. I pieced this together using various piece of the Roll A Ball tutorial. However, the camera continues moving for about a half second after I release the key. Obviously that’s not optimal performance. Here’s the script:

public class camera_controller : MonoBehaviour
  {
  void Update ()
    {
    float horizontal = Input.GetAxis ("Pan Horizontal");
    float vertical   = Input.GetAxis ("Pan Vertical");
    float zoom       = Input.GetAxis ("Zoom");
    Vector3 position = transform.position;

    if (horizontal < 0) position.x += .1f;
    if (horizontal > 0) position.x -= .1f;
    if (vertical < 0) position.z += .1f;
    if (vertical > 0) position.z -= .1f;
    if (zoom < 0) position.y += .5f;
    if (zoom > 0) position.y -= .5f;

    transform.position = position;
    }
  }

There seems to be a LOT of variations on how to do this, but most of the examples I’ve seen are using
Time.deltaTime in the math somewhere. I didn’t originally have that, but adding it in hasn’t really affected anything, aside from slowing the scrolling way down.

    if (horizontal < 0) position.x += 10f * Time.deltaTime;

What about the way I wrote my script is causing the input delay? I’d rather understand the code rather than just copy/paste something that “works” without having learned anything.

You could do something much easier:

   void Update ()
   {
     float horizontal = Input.GetAxis ("Pan Horizontal");
     float vertical = Input.GetAxis ("Pan Vertical");
     float zoom = Input.GetAxis ("Zoom");
     float speed = 5f;

     transform.Translate(horizontal * speed * Time.deltaTime, zoom * speed * Time.deltaTime, vertical * speed * Time.deltaTime);
   }

Also, shouldn’t zoom be the Z axis instead of the Y and vertical be the Y axis and not the Z?