/// <summary>
/// 计算多个物体的中心点
/// </summary>
/// <param name="Points"></param>
/// <returns></returns>
public Vector3 Calculate_CenterPoint(List<Transform> Points)
{
int total = Points.Count;
float lat = 0, lon = 0;
foreach (Transform p in Points)
{
lat += p.transform.position.x;// * Mathf.PI / 180;
lon += p.transform.position.z;// * Mathf.PI / 180;
}
lat /= total;
lon /= total;
Vector3 centerPoint = new Vector3(lat, Points[0].position.y, lon);
return centerPoint;
}