SmoothLookAt CS

Author: Jake Bayer (BakuJake14)

Description
C# version of the SmoothLookAt script that comes with Unity. Like the JS version, it locks on to a target and looks at the target while in a fixed position. Useful for indoor scenes.

Usage
Works the same way as the JS version. Attach the script below to a camera and drag an object into the Target slot. If Smooth is turned on, the camera will dampen its transform (handled by the private variable _myTransform) as well as look at the target. Otherwise, it will just look at the target. The public variable MinDistance handles how far the camera should be from the Target. Use Damping to control the camera's movement.

Note: The lines of code concerning colors and and the Start function are not needed, so they have been commented out.