In this recipe, we will create a telescopic camera that zooms in whenever the left mouse button is pressed.
Zooming a telescopic camera
Getting ready...
This recipe adds to the scene created in the first recipe of this chapter, so make a copy of that project folder and do your work for this recipe with that copy.
How to do it...
To create a telescopic camera, follow these steps:
- Create a new C# script-class named TelescopicView, and add an instance-object as a component to the Main Camera (child of MsLazer):
using UnityEngine;
public class TelescopicView : MonoBehaviour...