Switching between multiple cameras
Choosing from a variety of cameras is a common feature in many genres: racing, sports, tycoon/strategy, and many others. In this recipe, you will learn how to give players the ability to choose from many cameras by using their keyboards.
Getting ready
For this recipe, we have prepared the BasicScene
Unity package containing a scene named BasicScene
. The package is in the 1362_05_codes
folder.
How to do it...
To implement switchable cameras, follow these steps:
- Import the
BasicScene
package into a new Project. - From the Project view, open the BasicScene level. This is a basic scene featuring an animated character and some extra geometry.
- Add two more cameras to the scene through the Create drop-down menu on top of the ...
Get Unity 5.x Cookbook 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.