Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MainCamera : MonoBehaviour
- {
- public Transform Target;
- // Use this for initialization
- void Start()
- {
- Debug.Log(Vector3.Distance(Target.position, transform.position));
- }
- // Update is called once per frame
- void Update()
- {
- transform.LookAt(Target);
- Debug.Log(Vector3.Distance(Target.position, transform.position));
- }
- }
Add Comment
Please, Sign In to add comment