title: Get gameobject of unity collider when it is attached to a rigidbody
body: <p>I have a game object that has a rigidbody and then a group of sub game objects with sprites and colliders where each collider is attached to the parent's rigidbody.
  This works well for the physics and collisions as the entire group of objects will bounce and collide off of the scenery.
  However, when two groups collide I want their to be damage on one of the individual sub game objects.
  I have a OnCollisionEnter2D(Collision2D coll) on each of the sub objects(Which have the collider on them) however, when they collide with another group using coll.gameObject the returned game object is always the parent and not the individual sub object.</p>
  
  <p>Long Story Short:
  Is there any way to get the game object of a collider when it is attached to another game object with a rigid body?</p>
  
  <p>Note: I have seen some solutions that use a ray cast to find the object but it seems like a lot of unnecessary work.</p>
  
  <p>Note 2: I have also seen options that use trigger but i prefer the collision as it handles physics as well.</p>
  
  <pre><code>private void OnCollisionEnter2D(Collision2D coll)
  {
          Debug.Log(coll.gameObject.name); // Showing the parent
          ShipPiece sp = coll.gameObject.GetComponent&lt;Piece&gt;(); // Looking for the individual piece
          if (sp != null)
          {
              // Apply the damage to the other piece based off the weight of this piece
              coll.gameObject.SendMessage("ApplyDamage", weight*10);
          }
  }
  </code></pre>
  
  <p>Obviously I can can the first Piece in the collision as it is the class where OnCollisionEnter2D exists, but I cannot figure out a way to get the second Piece which its colliding into.</p>