function Update () { var hit : RaycastHit; Debug.DrawRay (transform.position, -transform.up * 200, Color.red); if (Physics.Raycast (transform.position, -transform.up, hit, 200)){ transform.up = hit.normal; } }