Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Update () {
- var hit : RaycastHit;
- if (Physics.Raycast (transform.position, -Vector3.up, hit)) {
- var distanceToGround = hit.distance;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement