private bool CheckVolumeMassRec(HkdBreakableShape bShape, float minVolume, float minMass)
        {
            if (bShape.Name.Contains("Fake"))
            {
                return(true);
            }
            if (bShape.Volume <= minVolume)
            {
                return(false);
            }
            HkMassProperties mp = new HkMassProperties();

            bShape.BuildMassProperties(ref mp);
            if (mp.Mass <= minMass)
            {
                return(false);
            }
            if (mp.InertiaTensor.M11 == 0 || mp.InertiaTensor.M22 == 0 || mp.InertiaTensor.M33 == 0)
            {
                return(false);
            }
            for (int i = 0; i < bShape.GetChildrenCount(); i++)
            {
                if (!CheckVolumeMassRec(bShape.GetChildShape(i), minVolume, minMass))
                {
                    return(false);
                }
            }
            return(true);
        }
 private bool CheckVolumeMassRec(HkdBreakableShape bShape, float minVolume, float minMass)
 {
     if (bShape.Name.Contains("Fake"))
         return true;
     if (bShape.Volume <= minVolume)
         return false;
     HkMassProperties mp = new HkMassProperties();
     bShape.BuildMassProperties(ref mp);
     if (mp.Mass <= minMass)
         return false;
     if (mp.InertiaTensor.M11 == 0 || mp.InertiaTensor.M22 == 0 || mp.InertiaTensor.M33 == 0)
         return false;
     for (int i = 0; i < bShape.GetChildrenCount(); i++)
     {
         if (!CheckVolumeMassRec(bShape.GetChildShape(i), minVolume, minMass))
             return false;
     }
     return true;
 }