浏览代码

serve spawns forward

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

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


{
m_InvertMult = invertX ? -1f : 1f;
var agentOutX = Random.Range(12f, 16f);
var agentOutX = Random.Range(12f, 14f);
var agentOutY = Random.Range(-1.5f, 0f);
transform.position = new Vector3(-m_InvertMult * agentOutX, agentOutY, -1.8f) + transform.parent.transform.position;
m_AgentRb.velocity = new Vector3(0f, 0f, 0f);

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


public void MatchReset()
{
var ballOut = Random.Range(12f, 16f);
var ballOut = Random.Range(14f, 16f);
var flip = Random.Range(0, 2);
if (flip == 0)
{

正在加载...
取消
保存