Cameras and curves
For cut-scenes, menu backgrounds, or simpler camera fly-throughs, you might just need the camera to travel roughly in a straight line that allows some curvature and fluctuation in speed as the camera moves using a smooth-in and smooth-out motion. This means that the camera picks up speed at the beginning and slowly drops in speed towards the end of the path. To achieve this, you can use a prescripted animation via Unity's animation editor, or you can use animation curves, which offer a high degree of flexibility and control over object transformations across time, as shown here:
To create a camera ...
Get Mastering Unity Scripting now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.