public void EvaluatePartCollision(Collider a_otherCol, float a_colVelSqr)
{
// Find the part being collided with
Collider[] childColliders;
foreach (ShipPart part in destructableParts)
{
childColliders = part.partObject.GetComponentsInChildren<Collider>();
foreach (Collider col in childColliders)
{
// Check if the collision actually involves the part
if (col == a_otherCol)
{
//Debug.Log("Colliding with: " + col + ", part : " + part.partObject.name);
//Debug.Log(colVelSqr);
ApplyPartCollision(part, a_colVelSqr);
// Collision has evaluated, return back to OnCollisionEnter
return;
}
}
}
}