Headbobber

Author: (Mr. Animator)

Description
This script makes an object bob up and down smoothly when you're pressing one or both of the horizontal/vertical axes. Attach it to a camera and play with the public variables to get the feel of your player's head bobbing as they walk. The midpoint variable is whatever value for the Y translate you want to be considered the middle of the camera's bobbing range.

Usage
Place this script on a Camera.