浏览代码

-Removed debug messaging in buoyant object code

-Prepared scene to merge back into physics branch
/dots-input
Mike Geig 5 年前
当前提交
15571ea3
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 4
      Packages/com.verasl.water-system/Scripts/BuoyantObject.cs

4
Packages/com.verasl.water-system/Scripts/BuoyantObject.cs


if(_buoyancyType == BuoyancyType.PhysicalVoxel)
{
Debug.Log("new pass: " + gameObject.name);
//Debug.Log("new pass: " + gameObject.name);
Physics.autoSyncTransforms = false;
for(var i = 0; i < voxels.Length; i++) BuoyancyForce(voxels[i], heights[i].y, ref submergedAmount, ref debugInfo[i]);
Physics.SyncTransforms();

RB.AddForceAtPosition(force, wp);
_debug.force = force; // For drawing force gizmos
Debug.Log(string.Format("Position: {0:f1} -- Force: {1:f2} -- Height: {2:f2}\nVelocty: {3:f2} -- Damp: {4:f2} -- Mass: {5:f1} -- K: {6:f2}", wp, force, waterLevel, velocity, localDampingForce, RB.mass, localArchimedesForce));
//Debug.Log(string.Format("Position: {0:f1} -- Force: {1:f2} -- Height: {2:f2}\nVelocty: {3:f2} -- Damp: {4:f2} -- Mass: {5:f1} -- K: {6:f2}", wp, force, waterLevel, velocity, localDampingForce, RB.mass, localArchimedesForce));
}
}

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存