title: How to change the forward direction of Raycast
body: <p>I have an object in my unity3d project.</p>
  
  <p>Somehow its face is facing unity's down.
  So if I Raycast to forward, the ray is actually pointing to object's up.
  If I Raycast to down, the ray points to object's forward.</p>
  
  <p>How to correct this?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>function Update () 
  {
  
      //scan
      var fwd = transform.TransformDirection (Vector3.down);
      var hit : RaycastHit;
      if (Physics.Raycast (transform.position, fwd, hit, 50)) 
      {
         var distance = hit.distance;
  
         print('distance = ' + distance);
      }
      else
      {
          print('Raycast did not hit anything');
      }
  }
  </code></pre>