Last active
October 16, 2019 03:33
-
-
Save Yecats/a1a45f42e9a199ff4327da0c84e5f79a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CameraController : MonoBehaviour | |
| { | |
| [Header("General Properties")] | |
| public GameObject CameraRig; | |
| private Camera _actualCamera; | |
| //Movement variables | |
| private Vector3 _moveTarget; | |
| // Start is called before the first frame update | |
| void Start() | |
| { | |
| // Store a reference to our camera | |
| _actualCamera = CameraRig.GetComponentInChildren<Camera>(); | |
| // Set the initial _moveTarget to the rig’s position. | |
| _moveTarget = CameraRig.transform.position; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment