Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Update () {
- if (Input.GetMouseButtonDown(0)) {
- RaycastHit hit;
- Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
- if (Physics.Raycast(ray, out hit))
- if (hit.collider.gameObject.tag == "Door")
- Application.LoadLevel("Level1");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement