浏览代码

ball toss

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

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


var flip = Random.Range(0, 2);
if (flip == 0)
{
ball.transform.position = new Vector3(-ballOut, 12f, 0f) + transform.position;
ball.transform.position = new Vector3(-ballOut, 1f, 0f) + transform.position;
ball.transform.position = new Vector3(ballOut, 12f, 0f) + transform.position;
ball.transform.position = new Vector3(ballOut, 1f, 0f) + transform.position;
m_BallRb.velocity = new Vector3(0f, 0f, 0f);
m_BallRb.velocity = new Vector3(0f, 20f, 0f);
ball.transform.localScale = new Vector3(.5f, .5f, .5f);
m_BallScript.ResetPoint();
}

正在加载...
取消
保存