浏览代码

hitbonus

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

14
Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisAgent.cs


actionsOut[2] = Input.GetAxis("Vertical"); // Racket Rotation
}
//void OnCollisionEnter(Collision c)
//{
// if (c.gameObject.CompareTag("ball"))
// {
// AddReward(.4f * m_BallTouch);
// }
//}
void OnCollisionEnter(Collision c)
{
if (c.gameObject.CompareTag("ball"))
{
AddReward(.01f);
}
}
void FixedUpdate()
{

正在加载...
取消
保存