Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update() {
- Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
- RaycastHit hit;
- if (Physics.Raycast (ray, out hit, 100)) {
- Debug.Log ("Hit something!");
- } else {
- Debug.Log ("No Hit something!");
- }
- }
- Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Add Comment
Please, Sign In to add comment