title: Raycast reporting a collision in the wrong place
body: <p>I'm having a strange problem with my raycasts.</p>
  
  <p>I've a soldier character with some capsule colliders on various body parts to have body-part specific damage and they have a specific layer to only hit them. The character also has a character controller on the root. I currently use raycasts to grab whatever information I need on what the raycast hit.</p>
  
  <p>For some reason, the raycasts are reporting a collision on a completely different position from the collider it supposedly hits. It would say it's hitting the LlegUpperCollider but the hit point is somewhere a bit above the character. The editor shows that the collider is where its supposed to be. They seem to translate and orient themselves correctly with the character animation as well.</p>
  
  <p>Here's a screenshot: <img src="https://i.stack.imgur.com/2tmYS.jpg" alt="">.</p>
  
  <p>I've circled the hit point and I've drawn an arrow to where the collider actually is. </p>
  
  <p>You'll see two lines. The red one, that shows the raycast direction and hit point, has its origin on the enemies weapon position and it finishes on <code>hit.point</code>. The blue one The red one has its origin on the enemies weapon position and it finishes on <code>hit.collider.transform.position</code></p>
  
  <p>The script is on the soldier gun and uses the soldier object to place the rays. Here is the code:</p>
  
  <pre><code>enemyTransform = enemyObject.transform;  // enemyObject is a GameObject (the soldier object)
  var ray : Ray;
  ray.origin = enemyTransform.position + enemyTransform.up * 1.5 + enemyTransform.right * 0.25;
  ray.direction = enemyTransform.forward;
  
  var hit : RaycastHit;
  
  if(Physics.Raycast(ray.origin + ray.direction * 0.1, ray.direction, hit, fireRange, hitLayer.value))
  {   
  
     if (hit.collider.tag == GameManager.tagColliderHead || hit.collider.tag == GameManager.tagColliderChest ||   hit.collider.tag == GameManager.tagColliderExtremities) 
     {
        Debug.Log("CR -COLLIDER = "+hit.collider.tag+" name = "+hit.collider.name+"Hit.point = "+hit.point);
  
        Utils.DibujarLinea(line1, ray.origin, hit.point, Color.red, Color.red);
        Utils.DibujarLinea(line2, ray.origin, hit.collider.transform.position, Color.blue, Color.blue);
  
     }
  }
  </code></pre>
  
  <p>Utils.DibujarLinea() is:</p>
  
  <pre><code>static function DibujarLinea(linea : LineRenderer, StartPoint : Vector3, EndPoint : Vector3, Color1 : Color, Color2 : Color)
     {
        linea.SetColors(Color1, Color2);
        linea.useWorldSpace = true;
        linea.SetWidth(0.02f,0.02f);
        linea.SetVertexCount(2);
        linea.SetPosition(0, StartPoint);
        linea.SetPosition(1, EndPoint);
     }
  </code></pre>