Advertisement
xtyronex48

Untitled

Dec 13th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. RaycastHit hit;
  2. // Does the ray intersect any objects excluding the player layer
  3. if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.up), out hit, Mathf.Infinity))
  4. {
  5. if(collider =="ThirdPersonController");
  6. {
  7. SceneManager.LoadScene(1);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement