Guest User

Untitled

a guest
Dec 3rd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. void Update() {
  2.  
  3. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  4. RaycastHit hit;
  5. if (Physics.Raycast (ray, out hit, 100)) {
  6. Debug.Log ("Hit something!");
  7. } else {
  8. Debug.Log ("No Hit something!");
  9. }
  10. }
  11.  
  12. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Add Comment
Please, Sign In to add comment