title: Unity Raycast not working from close distances
body: <p>I'm trying to have various interactions take place when looking at a game object, but it doesn't seem to work when I'm too close. I'm using Unity's first person controller and the script it attached to the camera.</p>
  
  <pre><code>void Update () {
      RaycastHit hit;
      Vector3 forward = transform.TransformDirection(Vector3.forward) * 10;
      if(Physics.Raycast(transform.position,(forward), out hit) ){
          GameObject lookingAt = hit.collider.gameObject;
          if (lookingAt.layer == 9)
          {
              Debug.Log("This doesn't always show up.");
          }
      }
  
  }
  </code></pre>