Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update () {
- RaycastHit hit;
- Ray ray = Camera.main.ScreenPointToRay (new Vector3 (Screen.width / 2, Screen.height / 2));
- if (Physics.Raycast (ray,out hit)) {
- Debug.DrawLine (transform.position, hit.point, Color.cyan);
- }
- }
Add Comment
Please, Sign In to add comment