Advertisement
Guest User

Untitled

a guest
Sep 19th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Update () {
  2. var hit : RaycastHit;
  3. if (Physics.Raycast (transform.position, -Vector3.up, hit)) {
  4. var distanceToGround = hit.distance;
  5. }
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement