Time for action – controlling the camera
We will only need one, fairly short script to control and manage our camera:
- To start and to keep everything organized, create a new empty GameObject and name it
CameraRig. Also, to keep it simple, set its position to zero on each axis.
- Next, create three more empty GameObject and name them
TopPoint. Set their X axis positions to
5. Position the
LeftPointto be in front of the slingshot and at
3on the Y axis. The
RightPointneeds to be positioned in front of the
pigstructure you created. The
TopPointcan be over the slingshot, but needs to set to
8on the Y axis. These three points will define the limits of where our camera can move when being dragged and following birds.
- Make ...