Unity3D-4-Axis-Camera-Script
How To Use
Drag the AxisBasedCamera script onto your camera component, make sure that your camera is set as the main camera in the scene, and it should work.
You also need a PlayerMovement class, but you can easily replace that code where it is required with just somehow getting the player's position transform instead.