Advertisement
Guest User

Untitled

a guest
Sep 5th, 2015
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. void Update () {
  2. if (Input.GetMouseButtonDown(0)) {
  3. RaycastHit hit;
  4. Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
  5. if (Physics.Raycast(ray, out hit))
  6. if (hit.collider.gameObject.tag == "Door")
  7. Application.LoadLevel("Level1");
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement