浏览代码

Add TargetController/OrientationCubeController Components & Bugfix (#4157)

* added Target and OCube controllers. updated crawler envs

* update walker prefab

* add refs to prefab

* Update Crawler.prefab

* update platform, ragdoll,  ocube prefabs

* reformat file

* reformat files

* fix behavior name

* add final retrained crawler and walker nn files

* collect hip ocube rot in world space

* update crawler observations and update prefabs

* change to 20M steps

* update crwl prefab to 142 observ

* update obsvs to 241. add expvel  reward

* change walkspeed to 3

* add new crawler and walker nn files

* adjust rewards

* enable other pairs

* add RewardManager

* cleanup about to do final training

* cleanup add nn files for increased facing rew reduced height rew

* try no facing rew

* add vel only policy, try dy target

* inc torq on cube

* added dynamic cube nn. gonna try 40M steps

* add 40M step test, more cleanup

* ch...
/MLA-1734-demo-provider
GitHub 4 年前
当前提交
8b913a96
共有 33 个文件被更改,包括 3190 次插入3645 次删除
  1. 65
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab
  2. 385
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab
  3. 286
      Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab
  4. 45
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity
  5. 381
      Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity
  6. 111
      Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
  7. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn
  8. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerDynamic.nn.meta
  9. 1001
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn
  10. 2
      Project/Assets/ML-Agents/Examples/Crawler/TFModels/CrawlerStatic.nn.meta
  11. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/Outline.mat
  12. 5
      Project/Assets/ML-Agents/Examples/SharedAssets/Materials/UIDefault.mat
  13. 15
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/OrientationCube.prefab
  14. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/JointDriveController.cs
  15. 310
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/DynamicPlatformWalker.prefab
  16. 153
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerRagdoll.prefab
  17. 277
      Project/Assets/ML-Agents/Examples/Walker/Prefabs/WalkerWithTargetPair.prefab
  18. 76
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerDynamic.unity
  19. 60
      Project/Assets/ML-Agents/Examples/Walker/Scenes/WalkerStatic.unity
  20. 137
      Project/Assets/ML-Agents/Examples/Walker/Scripts/WalkerAgent.cs
  21. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn
  22. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerDynamic.nn.meta
  23. 1001
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn
  24. 2
      Project/Assets/ML-Agents/Examples/Walker/TFModels/WalkerStatic.nn.meta
  25. 2
      config/ppo/WalkerDynamic.yaml
  26. 159
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab
  27. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/DynamicTarget.prefab.meta
  28. 149
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab
  29. 7
      Project/Assets/ML-Agents/Examples/SharedAssets/Prefabs/StaticTarget.prefab.meta
  30. 24
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs
  31. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/OrientationCubeController.cs.meta
  32. 135
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs
  33. 11
      Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/TargetController.cs.meta

65
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/Crawler.prefab


- component: {fileID: 4845971000000621466}
m_Layer: 0
m_Name: foreleg0
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000245862062}
m_Layer: 0
m_Name: foreleg3
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000281612788}
m_Layer: 0
m_Name: foreleg2
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000566026491}
m_Layer: 0
m_Name: leg2
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971000943818052}
m_Layer: 0
m_Name: leg3
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001325249075}
m_Layer: 0
m_Name: leg1
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001327158052}
m_Layer: 0
m_Name: leg0
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001588102144}
m_Layer: 0
m_Name: Body
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

- component: {fileID: 4845971001622533709}
m_Layer: 0
m_Name: foreleg1
m_TagString: Untagged
m_TagString: agent
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

VectorActionSize: 14000000
VectorActionDescriptions: []
VectorActionSpaceType: 1
m_Model: {fileID: 11400000, guid: 9049db2514a454914be8f5e5d3508ffe, type: 3}
m_Model: {fileID: 11400000, guid: c6509001ba679447fba27f894761c3ba, type: 3}
m_BehaviorName: CrawlerDynamic
m_BehaviorName: CrawlerStatic
TeamId: 0
m_UseChildSensors: 1
m_ObservableAttributeHandling: 0

MaxStep: 5000
maximumWalkingSpeed: 999
target: {fileID: 0}
targetSpawnRadius: 40
detectTargets: 1
respawnTargetWhenTouched: 1
ground: {fileID: 0}
body: {fileID: 4845971001588102148}
leg0Upper: {fileID: 4845971001327157979}
leg0Lower: {fileID: 4845971000000621467}

leg2Lower: {fileID: 4845971000281612789}
leg3Upper: {fileID: 4845971000943818107}
leg3Lower: {fileID: 4845971000245862063}
orientationCube: {fileID: 2270141184585723037}
orientationCube: {fileID: 4462656217269709630}
foot0: {fileID: 0}
foot1: {fileID: 0}
foot2: {fileID: 0}
foot3: {fileID: 0}
groundedMaterial: {fileID: 0}
unGroundedMaterial: {fileID: 0}
foot0: {fileID: 4845971001702882992}
foot1: {fileID: 4845970999844939483}
foot2: {fileID: 4845970999929964134}
foot3: {fileID: 4845971001308907666}
groundedMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
unGroundedMaterial: {fileID: 2100000, guid: eaad04b0e0dec42229c9cb00a981d7ac, type: 2}
--- !u!114 &4845971001715176662
MonoBehaviour:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 4845971001715176651}
m_Modifications:
- target: {fileID: 2591864625898824423, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
propertyPath: m_LocalPosition.x

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72f745913c5a34df5aaadd5c1f0024cb, type: 3}
--- !u!1 &2270141184585723037 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2591864627249999519, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2270141184585723026 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2591864627249999504, guid: 72f745913c5a34df5aaadd5c1f0024cb,

--- !u!114 &4462656217269709630 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114705911240010044, guid: 72f745913c5a34df5aaadd5c1f0024cb,
type: 3}
m_PrefabInstance: {fileID: 4357529801223143938}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8385811723256971493
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 6084207059270429360, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.5078
value: -1.996
objectReference: {fileID: 0}
- target: {fileID: 6084207059270429360, guid: e568400ebedb3474fac505995f12ed4a,
type: 3}

385
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/DynamicPlatform.prefab


- {fileID: 6810593986226363672}
- {fileID: 8951412967461282419}
- {fileID: 6810815557394078638}
- {fileID: 6817236684048233896}
- {fileID: 7802320107249901494}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6814123289269777284
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6817298226888617532}
- component: {fileID: 6851853045169865310}
m_Layer: 0
m_Name: Point Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &6817298226888617532
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814123289269777284}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6817236684048233896}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!108 &6851853045169865310
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814123289269777284}
m_Enabled: 1
serializedVersion: 8
m_Type: 2
m_Color: {r: 1, g: 0.85834146, b: 0.472, a: 1}
m_Intensity: 1
m_Range: 15
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 0
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!1 &6814139680395863842
GameObject:
m_ObjectHideFlags: 0

serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &6814157246584779846
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6817236684048233896}
- component: {fileID: 6837572177240906570}
- component: {fileID: 6805840284374846290}
- component: {fileID: 6827732506104714502}
- component: {fileID: 6797943023466929340}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6817236684048233896
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 6.2, y: 1.15, z: 3.824}
m_LocalScale: {x: 1.2356956, y: 1.2356961, z: 1.2356961}
m_Children:
- {fileID: 6817298226888617532}
m_Father: {fileID: 6810587057221831324}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6837572177240906570
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &6805840284374846290
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &6827732506104714502
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!54 &6797943023466929340
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6814157246584779846}
serializedVersion: 2
m_Mass: 5
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!1 &6814265275650057734
GameObject:
m_ObjectHideFlags: 0

m_Modification:
m_TransformParent: {fileID: 6810587057221831324}
m_Modifications:
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.49
objectReference: {fileID: 0}
objectReference: {fileID: 6817236684048233896}
objectReference: {fileID: 7802320107249901494}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000007
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000044703484
objectReference: {fileID: 0}
- target: {fileID: 4845971000245862049, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.32999957
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.000000014901161
objectReference: {fileID: 0}
- target: {fileID: 4845971000281612791, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000052
objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971000943818055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001325249074, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.28284281
objectReference: {fileID: 0}
- target: {fileID: 4845971001327158055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.28284273
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000000029802322
objectReference: {fileID: 0}
- target: {fileID: 4845971001622533708, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000004
objectReference: {fileID: 0}
objectReference: {fileID: 11400000, guid: 87bf6e217025144c2a0168ee4bd2466d,
objectReference: {fileID: 11400000, guid: 7040ebdb10cab44a7b516d0933dcd0d2,
type: 3}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
propertyPath: m_BehaviorName
value: CrawlerDynamic
objectReference: {fileID: 0}
objectReference: {fileID: 6817236684048233896}
objectReference: {fileID: 7738248088303878723}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: orientationCube
value:
objectReference: {fileID: 186649206436789638}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedComponents:
- {fileID: 7147393771121027373, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
--- !u!4 &8951412967461282419 stripped
Transform:

m_PrefabAsset: {fileID: 0}
--- !u!114 &8951412967461282417 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &186649206436789638 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4462656217269709630, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 4573852208357529272}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 771e78c5e980e440e8cd19716b55075f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &6413179990576818696
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6810587057221831324}
m_Modifications:
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 8951412967461282417}
- target: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalPosition.z
value: 5
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
propertyPath: m_Name
value: DynamicTarget
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 46734abd0de454192b407379c6a4ab8d, type: 3}
--- !u!4 &7802320107249901494 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7738248088303878723 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 46734abd0de454192b407379c6a4ab8d,
type: 3}
m_PrefabInstance: {fileID: 6413179990576818696}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:

286
Project/Assets/ML-Agents/Examples/Crawler/Prefabs/FixedPlatform.prefab


m_Children:
- {fileID: 3386028169429758297}
- {fileID: 4924174722017668}
- {fileID: 4749909135913778}
- {fileID: 2673081981996998229}
--- !u!1 &1379819145489036
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4749909135913778}
- component: {fileID: 33357510309310810}
- component: {fileID: 65988756214975206}
- component: {fileID: 23273142761279318}
m_Layer: 0
m_Name: Target
m_TagString: target
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4749909135913778
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 975, y: 4, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4309919623019186}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &33357510309310810
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65988756214975206
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &23273142761279318
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1379819145489036}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &1846708386698568
GameObject:
m_ObjectHideFlags: 0

m_Convex: 0
m_CookingOptions: 14
m_Mesh: {fileID: 4300002, guid: 5b535e54498332546a40dec193a2a56a, type: 3}
--- !u!1001 &7907703421359097234
--- !u!1001 &1179916799623326699
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2

- target: {fileID: 1141786540848836948, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Mode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_RootOrder
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_CallState
- target: {fileID: 2270141184585723026, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Target
value:
objectReference: {fileID: 3386028169429758299}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
value: TouchedTarget
objectReference: {fileID: 0}
- target: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: onCollisionEnterEvent.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.x
value: 975
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_RootOrder
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.x
- target: {fileID: 2310084103354264149, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
propertyPath: m_LocalPosition.y
value: -1.996
propertyPath: m_LocalScale.y
value: 1
- target: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_LocalScale.z
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3840539935788495952, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
propertyPath: m_Name
value: StaticTarget
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e, type: 3}
--- !u!4 &2673081981996998229 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3839136118347789758, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 1179916799623326699}
m_PrefabAsset: {fileID: 0}
--- !u!114 &2466880273407263648 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3631016866778687563, guid: 2173d15c0b5fc49e5870c9d1c7f7ee8e,
type: 3}
m_PrefabInstance: {fileID: 1179916799623326699}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c8f113a8b8d94967b1b1782c549be81, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &7907703421359097234
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4309919623019186}
m_Modifications:
objectReference: {fileID: 4749909135913778}
objectReference: {fileID: 2673081981996998229}
- target: {fileID: 4845971000000621469, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x

objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.28284284
objectReference: {fileID: 0}
- target: {fileID: 4845971000566026490, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: 0.2828427
objectReference: {fileID: 0}
- target: {fileID: 4845971000943818055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.2828427
objectReference: {fileID: 0}
- target: {fileID: 4845971001325249074, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.z
value: -0.28284284
objectReference: {fileID: 0}
- target: {fileID: 4845971001327158055, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}

objectReference: {fileID: 0}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_BehaviorName
value: CrawlerStatic
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176648, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
objectReference: {fileID: 11400000, guid: c6509001ba679447fba27f894761c3ba,
objectReference: {fileID: 11400000, guid: ff52bf4e5f6124657b7139e8dfe730e7,
objectReference: {fileID: 4749909135913778}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: ground
value:
objectReference: {fileID: 4856650706546504}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: respawnTargetWhenTouched
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: targetIsStatic
value: 1
objectReference: {fileID: 0}
objectReference: {fileID: 2466880273407263648}
- target: {fileID: 4845971001715176651, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_Name
value: Crawler
objectReference: {fileID: 0}
- target: {fileID: 8742078559849259273, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 0456c89e8c9c243d595b039fe7aa0bf9, type: 3}
--- !u!4 &3386028169429758297 stripped

m_PrefabInstance: {fileID: 7907703421359097234}
m_PrefabAsset: {fileID: 0}
--- !u!114 &3386028169429758299 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4845971001715176649, guid: 0456c89e8c9c243d595b039fe7aa0bf9,
type: 3}
m_PrefabInstance: {fileID: 7907703421359097234}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f37c30a5e8d04117947188818902ef3, type: 3}
m_Name:
m_EditorClassIdentifier:

45
Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerDynamicTarget.unity


propertyPath: m_Name
value: DynamicPlatform (6)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (9)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (4)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (8)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

propertyPath: m_Name
value: DynamicPlatform (3)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
propertyPath: m_Name
value: DynamicPlatform (1)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

propertyPath: m_Name
value: DynamicPlatform (7)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_ConnectedAnchor.x

type: 3}
propertyPath: m_Name
value: DynamicPlatform (5)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

type: 3}
propertyPath: m_Name
value: DynamicPlatform (2)
objectReference: {fileID: 0}
- target: {fileID: 6813981368972186340, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6815147845698256993, guid: 0058b366f9d6d44a3ba35beb06b0174b,
type: 3}

381
Project/Assets/ML-Agents/Examples/Crawler/Scenes/CrawlerStaticTarget.unity


propertyPath: m_Name
value: FixedPlatform (1)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

propertyPath: m_ConnectedAnchor.y
value: 0.33000547
objectReference: {fileID: 0}
- target: {fileID: 8231708464545277303, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &258681675

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (6)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (9)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &471764575

propertyPath: m_Name
value: FixedPlatform (7)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.y
value: -0.14285131
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &586831923

propertyPath: m_Name
value: FixedPlatform (3)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1 &1392866527

propertyPath: m_Name
value: FixedPlatform (8)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_Name
value: FixedPlatform (5)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: m_ConnectedAnchor.y
value: -0.14285858
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000066310167
objectReference: {fileID: 0}
- target: {fileID: 3386028169001571294, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000672
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.0000067949295
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000684
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.000006571412
objectReference: {fileID: 0}
- target: {fileID: 3386028170881877093, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.3300071
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.0000069588423
objectReference: {fileID: 0}
- target: {fileID: 3386028170904845107, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.y
value: 0.33000648
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
--- !u!1001 &2071138685

propertyPath: m_Name
value: FixedPlatform (4)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

propertyPath: m_Name
value: FixedPlatform (2)
objectReference: {fileID: 0}
- target: {fileID: 1306438584782738, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4309919623019186, guid: 1b9d167a4e71146a883212e4f08bda88, type: 3}
propertyPath: m_LocalPosition.x
value: 200

propertyPath: m_ConnectedAnchor.z
value: 0.28284454
objectReference: {fileID: 0}
- target: {fileID: 3386028169665032405, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028169836750752, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

- target: {fileID: 3386028169838659253, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: 0.2828369
objectReference: {fileID: 0}
objectReference: {fileID: 0}
- target: {fileID: 3386028170461648232, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}
propertyPath: m_ConnectedAnchor.x
value: -0.2828369
objectReference: {fileID: 0}
- target: {fileID: 3386028170626051599, guid: 1b9d167a4e71146a883212e4f08bda88,
type: 3}

111
Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs


Quaternion m_WalkDirLookRot; //Will hold the rotation to our target
[Header("Target To Walk Towards")] [Space(10)]
public Transform target; //Target the agent will walk towards.
public float targetSpawnRadius; //The radius in which a target can be randomly spawned.
public bool detectTargets; //Should this agent detect targets
public bool respawnTargetWhenTouched; //Should the target respawn to a different position when touched
public Transform ground; //Ground gameobject. The height will be used for target spawning
public TargetController target; //Target the agent will walk towards.
[Header("Body Parts")] [Space(10)] public Transform body;
public Transform leg0Upper;

[Header("Orientation")] [Space(10)]
//This will be used as a stable reference point for observations
//Because ragdolls can move erratically, using a standalone reference point can significantly improve learning
public GameObject orientationCube;
//This will be used as a stabilized model space reference point for observations
//Because ragdolls can move erratically during training, using a stabilized reference transform improves learning
public OrientationCubeController orientationCube;
JointDriveController m_JdController;

public override void Initialize()
{
UpdateOrientationCube();
orientationCube.UpdateOrientation(body, target.transform);
m_JdController = GetComponent<JointDriveController>();

}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
orientationCube.UpdateOrientation(body, target.transform);
}
/// <summary>
sensor.AddObservation(bp.groundContact.touchingGround ? 1 : 0); // Whether the bp touching the ground
//GROUND CHECK
sensor.AddObservation(bp.groundContact.touchingGround); // Is this bp touching the ground
//Get velocities in the context of our orientation cube's space
//Note: You can get these velocities in world space as well but it may not train as well.

/// </summary>
public override void CollectObservations(VectorSensor sensor)
{
//Add body rotation delta relative to orientation cube
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.position));
sensor.AddObservation(orientationCube.transform.InverseTransformPoint(target.transform.position));
RaycastHit hit;
float maxRaycastDist = 10;

public void TouchedTarget()
{
AddReward(1f);
if (respawnTargetWhenTouched)
{
GetRandomTargetPos();
}
}
/// <summary>
/// Moves target to a random position within specified radius.
/// </summary>
public void GetRandomTargetPos()
{
var newTargetPos = Random.insideUnitSphere * targetSpawnRadius;
newTargetPos.y = 5;
target.position = newTargetPos + ground.position;
}
public override void OnActionReceived(float[] vectorAction)

bpDict[leg3Lower].SetJointStrength(vectorAction[++i]);
}
void UpdateOrientationCube()
{
//FACING DIR
m_WalkDir = target.position - orientationCube.transform.position;
m_WalkDir.y = 0; //flatten dir on the y
m_WalkDirLookRot = Quaternion.LookRotation(m_WalkDir); //get our look rot to the target
//UPDATE ORIENTATION CUBE POS & ROT
orientationCube.transform.position = body.position;
orientationCube.transform.rotation = m_WalkDirLookRot;
}
if (detectTargets)
{
foreach (var bodyPart in m_JdController.bodyPartsList)
{
if (bodyPart.targetContact && bodyPart.targetContact.touchingTarget)
{
TouchedTarget();
}
}
}
UpdateOrientationCube();
orientationCube.UpdateOrientation(body, target.transform);
// If enabled the feet will light up green when the foot is grounded.
// This is just a visualization and isn't necessary for function

void RewardFunctionTimePenalty()
{
AddReward(-0.001f);
}
/// <summary>
/// Loop over body parts and reset them to initial conditions.
/// </summary>
public override void OnEpisodeBegin()
{
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);
}
//Random start rotation to help generalize
transform.rotation = Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0);
UpdateOrientationCube();