浏览代码

Minor cleanup and comments

/main
Juozas Kasiliauskas 3 年前
当前提交
571e1d96
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 5
      InverseDynamicsDemoProject/Assets/ID_ExternalForces/ID_ExternalForces_Demo.cs

5
InverseDynamicsDemoProject/Assets/ID_ExternalForces/ID_ExternalForces_Demo.cs


void FixedUpdate()
{
// We apply the force here and clear the list, to ensure that all the forces were added
// only once and were added before we call GetJointExternalForces
foreach (var body in m_Bodies)
{
body.AddForce(m_WindForce * Time.fixedDeltaTime* Random.Range(0.75f, 1.25f));

m_ButtonText.text = "Apply Forces: " + b_ApplyExternalForces;
}
// We collect the bodies that are in our trigger zone, but don't apply the force yet
ArticulationBody ab = other.GetComponentInParent<ArticulationBody>();
if (ab != null)

正在加载...
取消
保存