浏览代码

fixing an important issue in the sensor

/exp-alternate-atten
vincentpierre 4 年前
当前提交
864d8d6c
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9
      Project/Assets/ML-Agents/Examples/Bullet/Scripts/AttentionSensorComponent.cs

9
Project/Assets/ML-Agents/Examples/Bullet/Scripts/AttentionSensorComponent.cs


/// <inheritdoc/>
public void Update() {
Reset();
// foreach (Bullet b in bullets)
// {
// b.transform.localScale = 0.5f * new Vector3(1,1,1);
// }
foreach (Bullet b in bullets)
{

m_ObservationBuffer[m_CurrentNumObservables * m_ObservableSize + 2] = b.transform.forward.x;
m_ObservationBuffer[m_CurrentNumObservables * m_ObservableSize + 3] = b.transform.forward.z;
m_CurrentNumObservables += 1;
// b.transform.localScale = 1f* new Vector3(1,1,1);
}
}

正在加载...
取消
保存