浏览代码

close

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

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


Quaternion deltaRotation = Quaternion.Euler(zAxis * rotateZ);
m_AgentRb.MoveRotation(m_AgentRb.rotation * deltaRotation);
if (invertX && transform.position.x - transform.parent.transform.position.x < -m_InvertMult * 3f ||
!invertX && transform.position.x - transform.parent.transform.position.x > -m_InvertMult * 3f)
if (invertX && transform.position.x - transform.parent.transform.position.x < -m_InvertMult ||
!invertX && transform.position.x - transform.parent.transform.position.x > -m_InvertMult)
transform.position = new Vector3(-m_InvertMult * 3f + transform.parent.transform.position.x,
transform.position = new Vector3(-m_InvertMult + transform.parent.transform.position.x,
transform.position.y,
transform.position.z);
}

正在加载...
取消
保存