浏览代码

minor tweaks.

/develop/input-actuator-tanks
Christopher Goy 4 年前
当前提交
b23b467d
共有 3 个文件被更改,包括 193 次插入22 次删除
  1. 11
      ML-Agents-Input-Example/Assets/Samples/Input System/1.0.2/Tanks Demo/Prefabs/Tank.prefab
  2. 198
      ML-Agents-Input-Example/Assets/Samples/Input System/1.0.2/Tanks Demo/Scenes/NewInput.unity
  3. 6
      com.unity.ml-agents.extensions/Runtime/Sensors/GridSensor.cs

11
ML-Agents-Input-Example/Assets/Samples/Input System/1.0.2/Tanks Demo/Prefabs/Tank.prefab


m_Script: {fileID: 11500000, guid: 33005b124d7f841a191249baf2bacb2a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ActionSpec:
m_NumContinuousActions: 3
BranchSizes: 02000000
--- !u!114 &2690620215108438311
MonoBehaviour:
m_ObjectHideFlags: 0

m_Bits: 1280
gridDepthType: 1
rootReference: {fileID: 2855894493477824887}
MaxColliderBufferSize: 500
InitialColliderBufferSize: 4
ChannelOffsets: 00000000
- {r: 1, g: 0.8690778, b: 0, a: 0}
- {r: 0, g: 0.35168457, b: 1, a: 0}
- {r: 1, g: 0.22373962, b: 0, a: 0}
- {r: 0.8113208, g: 0, b: 0.027757771, a: 0}
- {r: 0, g: 1, b: 0.022001743, a: 0}
GizmoYOffset: 0.5
ShowGizmos: 1
CompressionType: 1

198
ML-Agents-Input-Example/Assets/Samples/Input System/1.0.2/Tanks Demo/Scenes/NewInput.unity


m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &416936944
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 14
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 0, y: 58.736004, z: 0}
--- !u!1 &575313008
GameObject:

m_Children:
- {fileID: 102963700}
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}

--- !u!1001 &611677236
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2855894493463899285, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493463915671, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493463915671, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.x
value: 14.894004
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.z
value: -5.8989396
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477824887, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_Name
value: Tank (1)
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 926cad17a320cc74a9d2bbf498411492, type: 3}
--- !u!1 &661897827
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 86.366005, z: 0}
--- !u!1 &802799351
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: -75.954, z: 0}
--- !u!1 &1076556879
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 153.32301, z: 0}
--- !u!1 &1077890972
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 116.47201, z: 0}
--- !u!1 &1137415873
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 49.945004, z: 0}
--- !u!1 &1155732987
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 13
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: -120.881004, z: 0}
--- !u!1001 &1158996493
PrefabInstance:

objectReference: {fileID: 0}
- target: {fileID: 488946, guid: 312c52d27be2d2d42acea3ccebc4694b, type: 3}
propertyPath: m_RootOrder
value: 1
value: 3
objectReference: {fileID: 0}
- target: {fileID: 488946, guid: 312c52d27be2d2d42acea3ccebc4694b, type: 3}
propertyPath: m_LocalPosition.x

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 12
--- !u!1001 &1185438593
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2855894493463899285, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493463915671, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493463915671, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.x
value: 5.2401285
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.63764274
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477536293, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2855894493477824887, guid: 926cad17a320cc74a9d2bbf498411492,
type: 3}
propertyPath: m_Name
value: Tank
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 926cad17a320cc74a9d2bbf498411492, type: 3}
--- !u!1 &1282556331
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1304999364
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1391056259
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 15
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 0, y: -47.114002, z: 0}
--- !u!1 &2083660208
GameObject:

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

6
com.unity.ml-agents.extensions/Runtime/Sensors/GridSensor.cs


{
var cellCenter = Mat.MultiplyPoint(CellPoints[index]);
var rotation = Rotation;
Commands[index] = new BoxcastCommand(new Vector3(cellCenter.x, cellCenter.y + 7.0f, cellCenter.z),
Commands[index] = new BoxcastCommand(new Vector3(cellCenter.x, cellCenter.y + 5.0f, cellCenter.z),
halfScale,
rotation,
Vector3.down,

UpdateBufferFromJob();
var scale = new Vector3(CellScaleX, CellScaleY, CellScaleZ);
var offset = new Vector3(0, 7.0f, 0);
var offset = new Vector3(0, 5.0f, 0);
var oldGizmoMatrix = Gizmos.matrix;
for (var i = 0; i < NumCells; i++)
{

}
Gizmos.matrix = oldGizmoMatrix * cubeTransform;
Gizmos.color = CellActivity[i];
Gizmos.DrawWireCube(Vector3.zero, Vector3.one);
Gizmos.DrawCube(Vector3.zero, Vector3.one);
}
Gizmos.matrix = oldGizmoMatrix;

正在加载...
取消
保存