Guest User

Untitled

a guest
Jan 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public class MainCamera : MonoBehaviour
  2. {
  3. public Transform Target;
  4.  
  5. // Use this for initialization
  6. void Start()
  7. {
  8. Debug.Log(Vector3.Distance(Target.position, transform.position));
  9. }
  10.  
  11. // Update is called once per frame
  12. void Update()
  13. {
  14. transform.LookAt(Target);
  15. Debug.Log(Vector3.Distance(Target.position, transform.position));
  16. }
  17. }
Add Comment
Please, Sign In to add comment