/// <summary> /// 当物体增加时刷新重心 -------------------------------这个浮力加权有问题 /// </summary> /// <param name="newCube">新物体</param> private void UpdateGravity(CubeInfo newCube) { body.centerOfMass = m_centerOfMass.localPosition; SetGravity(PhysicsManager.SeekCenterMass(m_centerOfMass.transform.position, Mathf.RoundToInt(body.mass), newCube.GetParticle(), newCube.GetMass())); }