Guest User

Untitled

a guest
Nov 20th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. void Update () {
  2. RaycastHit hit;
  3. Ray ray = Camera.main.ScreenPointToRay (new Vector3 (Screen.width / 2, Screen.height / 2));
  4. if (Physics.Raycast (ray,out hit)) {
  5. Debug.DrawLine (transform.position, hit.point, Color.cyan);
  6. }
  7. }
Add Comment
Please, Sign In to add comment