Creating a player camera

The camera object is, in many ways, the most important in any scene, because without the presence of at least one camera, the scene can't be rendered at all. Dead Keys will eventually feature multiple cameras, each with a dedicated purpose. However, let's focus on the main camera, that is, the player perspective in the scene now. For first person games, you can create a camera easily by dragging and dropping a First Person Controller from the Project panel into the scene, from the Characters asset package. However, for Dead Keys, we don't need that; our camera path is fixed as it moves through the level and the user doesn't need free-look controls with the mouse or W A S D keys. Consequently, we'll create a custom ...

Get Mastering Unity 2017 Game Development with C# - Second Edition 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.