Ejemplo n.º 1
0
    public void GenerateSphereMeshes()
    {
      foreach( var tuple in listClothBodiesGORadius_ )
      {
        GameObject go = tuple.First;

        if ( go == null)
        {
          continue;
        }
        
        float radius  = tuple.Second;

        Caronte_Fx_Body crBody = go.GetComponent<Caronte_Fx_Body>();
        if (crBody != null)
        {
          Mesh mesh = null;
          if ( crBody.IsCustomCollider() )
          {
            mesh = crBody.GetCustomColliderMesh();
          }
          else
          {
            mesh = go.GetMesh();
          }
        
          if (mesh != null)
          {
            AddMeshSpheres( mesh, go.transform.localToWorldMatrix, radius );
          }
        }
      }
    }