title: Unity handle multiple collider with different purpose
body: <p>I have an Enemy with two different Collider.
  The first is a Box Collider, it's used as the enemy hitbox.</p>
  
  <p>The second is a Sphere Collider which I want to use to detect the player and his allies. This collider have the property IsTrigger set to true (the BoxCollider don't).</p>
  
  <p>My problem is that, when my player launch a projectile, it hits the Sphere Collider first. The Sphere Collider is treated as a hitbox and my Enemy takes damages.
  Here is the projectile script:</p>
  
  <pre><code>void OnTriggerEnter (Collider col)
  {
      if (col.gameObject.tag == "Player")
      {
          AUnit a = col.gameObject.GetComponent&lt;AUnit&gt;();
          if (a != null)
          {
              a.takeDamage(damage);
              if (goThrough == false)
                  Destroy(gameObject);
          }
      }
  }
  </code></pre>
  
  <p>My question is quite simple, how can I do to detect only detect the BoxCollider and ignore the SphereCollider ?</p>