Book Image

Mastering Unity Scripting

By : Alan Thorn
Book Image

Mastering Unity Scripting

By: Alan Thorn

Overview of this book

Table of Contents (17 chapters)
Mastering Unity Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


This chapter concentrated on many common tasks expected or needed of cameras. Cameras are essential in Unity and in any game engine, because they represent the perspective from which the scene is rendered to the screen. Most of the camera functionality is commonly taken for granted in Unity, and as a result, much of the flexibility and control that cameras offer us is lost and not discussed. Specifically, here, we first considered gizmo rendering, that is, how to permanently render the camera gizmo in the scene viewport even when the camera is deselected. Second, we saw how to determine which objects are visible to the camera and which are not. This included several kinds of important tests such as frustum presence and occlusion testing. Third, we saw how to create and configure orthographic cameras that render 2D elements without perspective distortion. Fourth, we saw how to edit and enhance a camera render through render textures. This involved overriding a series of camera-critical...