浏览代码

Merge branch 'soccer-2v1' into asymm-envs

/asymm-envs
Andrew Cohen 5 年前
当前提交
e1660b49
共有 3 个文件被更改,包括 11 次插入7 次删除
  1. 7
      Project/Assets/ML-Agents/Examples/Tennis/Materials/Physic_Materials/ballMat.physicMaterial
  2. 6
      Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab
  3. 5
      Project/Assets/ML-Agents/Examples/Tennis/Scripts/TennisArea.cs

7
Project/Assets/ML-Agents/Examples/Tennis/Materials/Physic_Materials/ballMat.physicMaterial


--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
bounciness: 1
bounciness: 0.8
frictionCombine: 1
bounceCombine: 3

6
Project/Assets/ML-Agents/Examples/Tennis/Prefabs/TennisArea.prefab


vectorActionSize: 03000000
vectorActionDescriptions: []
vectorActionSpaceType: 1
m_Model: {fileID: 11400000, guid: d6c5e749e4ceb4cf79640a5955706d3d, type: 3}
m_Model: {fileID: 11400000, guid: af0e636edb8584db08624f42c5f71f97, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Tennis

m_GameObject: {fileID: 1273406647218856}
serializedVersion: 2
m_Mass: 0.75
m_Drag: 0.2
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0

vectorActionSize: 03000000
vectorActionDescriptions: []
vectorActionSpaceType: 1
m_Model: {fileID: 11400000, guid: d6c5e749e4ceb4cf79640a5955706d3d, type: 3}
m_Model: {fileID: 11400000, guid: af0e636edb8584db08624f42c5f71f97, type: 3}
m_InferenceDevice: 0
m_BehaviorType: 0
m_BehaviorName: Tennis

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


public GameObject agentB;
Rigidbody m_BallRb;
HitWall m_BallScript;
Vector3 down = new Vector3(0f, -15f, 0f);
// Use this for initialization
void Start()
{

void FixedUpdate()
{
m_BallRb.AddForce(down);
//m_BallRb.velocity = new Vector3(Mathf.Clamp(rgV.x, -9f, 9f), Mathf.Clamp(rgV.y, -9f, 9f), rgV.z);
m_BallRb.velocity = new Vector3(Mathf.Clamp(rgV.x, -20f, 20f), Mathf.Clamp(rgV.y, -30f, 30f), rgV.z);
}
}
正在加载...
取消
保存