浏览代码

clip speed

/asymm-envs
Andrew Cohen 5 年前
当前提交
1b10ef6d
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 5
      Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs

5
Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs


void FixedUpdate()
{
m_BallRb.AddForce(down);
//var rgV = m_BallRb.velocity;
//Debug.Log(rgV.x);
//m_BallRb.velocity = new Vector3(Mathf.Clamp(rgV.x, -30f, 30f), Mathf.Clamp(rgV.y, -35f, 35f), rgV.z);
var rgV = m_BallRb.velocity;
m_BallRb.velocity = new Vector3(Mathf.Clamp(rgV.x, -40f, 40f), Mathf.Clamp(rgV.y, -45f, 45f), rgV.z);
}
}
正在加载...
取消
保存