Here's a script from Martin: PDControllerScript

If you want to do this, but only with a camera? Here is the script again from Martin: CameraFollowScript