浏览代码

more downward force/constrain y

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

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


float m_InvertMult;
FloatPropertiesChannel m_ResetParams;
float m_BallTouch;
Vector3 down = new Vector3(0f, -60f, 0f);
Vector3 down = new Vector3(0f, -100f, 0f);
// Looks for the scoreboard based on the name of the gameObjects.
// Do not modify the names of the Score GameObjects

var moveY = Mathf.Clamp(vectorAction[1], -1f, 1f);
var rotate = Mathf.Clamp(vectorAction[2], -1f, 1f) * m_InvertMult;
if (moveY > 0.0)// && transform.position.y - transform.parent.transform.position.y < -1.5f)
if (moveY > 0.0 && transform.position.y - transform.parent.transform.position.y < 5f)
{
m_AgentRb.velocity = new Vector3(m_AgentRb.velocity.x, moveY * 20f, 0f);
}

正在加载...
取消
保存