Benson kan køre på racetrack mini

This commit is contained in:
2024-04-20 19:13:25 +02:00
parent fe163ed7a1
commit 351575ea5e
4 changed files with 146 additions and 5 deletions

View File

@@ -1758,7 +1758,7 @@ Transform:
m_GameObject: {fileID: 153506}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 20.534557}
m_LocalPosition: {x: 0, y: 0, z: 38.17895}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:

View File

@@ -1 +1 @@
{"count":1,"self":41.9461504,"total":42.3638207,"children":{"InitializeActuators":{"count":1,"self":0.0010076,"total":0.0010076,"children":null},"InitializeSensors":{"count":1,"self":0.0025101,"total":0.0025101,"children":null},"AgentSendState":{"count":1869,"self":0.0296218,"total":0.052746299999999996,"children":{"CollectObservations":{"count":374,"self":0.0115569,"total":0.0115569,"children":null},"WriteActionMask":{"count":374,"self":0,"total":0,"children":null},"RequestDecision":{"count":374,"self":0.011567599999999999,"total":0.011567599999999999,"children":null}}},"DecideAction":{"count":1869,"self":0.2737062,"total":0.2737062,"children":{"RayPerceptionSensor.Perceive":{"count":748,"self":0,"total":0,"children":null}}},"AgentAct":{"count":1869,"self":0.0871966,"total":0.0871966,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":1,"max":25.4505272,"min":25.4505272,"runningAverage":25.4505272,"value":25.4505272,"weightedAverage":25.4505272}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713632396","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\noahk\\Documents\\Unity projects\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-noahk -hubSessionId e08cc479-296a-466a-a392-68af5330fc09 -accessToken S1StEIprioU2rzDDo5vTCfsRe2zgz-zUchvR2e0iCUQ005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1713632438"}}
{"count":1,"self":35.281376,"total":35.608020499999995,"children":{"InitializeActuators":{"count":1,"self":0.0015029,"total":0.0015029,"children":null},"InitializeSensors":{"count":1,"self":0.0010002,"total":0.0010002,"children":null},"AgentSendState":{"count":1539,"self":0.031876999999999996,"total":0.053541,"children":{"CollectObservations":{"count":308,"self":0.0070780999999999995,"total":0.0070780999999999995,"children":null},"WriteActionMask":{"count":308,"self":0.0010046,"total":0.0010046,"children":null},"RequestDecision":{"count":308,"self":0.0135813,"total":0.0135813,"children":null}}},"DecideAction":{"count":1539,"self":0.2263971,"total":0.2274013,"children":{"RayPerceptionSensor.Perceive":{"count":616,"self":0.0010042,"total":0.0010042,"children":null}}},"AgentAct":{"count":1539,"self":0.0421994,"total":0.0421994,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":1,"max":25.4576378,"min":25.4576378,"runningAverage":25.4576378,"value":25.4576378,"weightedAverage":25.4576378}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713633157","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\noahk\\Documents\\Unity projects\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-noahk -hubSessionId e08cc479-296a-466a-a392-68af5330fc09 -accessToken XB8kyQ8VJVDEYjLkfMcN4H-nbZA0GL-jU7iSmRPr-tQ005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1713633193"}}

View File

@@ -820,14 +820,98 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 170533247505012987, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 396140330680532875, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 744099280936139659, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 801451488576722815, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1196830192126786704, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1234340044873012413, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1782845334259341203, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1821257461652563359, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2065297755357871719, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2841995830362743840, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2955602324714020408, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3402082289135703546, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3430823091347191092, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3797832664772287022, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Name
value: TrainingV3
objectReference: {fileID: 0}
- target: {fileID: 3884183988336361944, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4463291330637767098, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4599812173407189096, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4931592534409690396, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5028891603338188081, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5206757801600008171, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5413340004314508697, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Name
value: Benson
objectReference: {fileID: 0}
- target: {fileID: 5413340004314508697, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_TagString
value: Player
objectReference: {fileID: 0}
- target: {fileID: 5500733104494827039, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5516939357876673302, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@@ -868,14 +952,30 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5597165083144512531, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5717467054321889237, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_LocalPosition.x
value: 62
objectReference: {fileID: 0}
- target: {fileID: 5878367908802067975, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6248371655047305591, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6408542808343726725, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6825457734151485959, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6858205825073773017, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Model
value:
@@ -884,6 +984,38 @@ PrefabInstance:
propertyPath: m_BehaviorType
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6914191039406937843, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6992985478128746580, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7573854107059249206, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7727797847984912868, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8330458478811375020, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8896804522281415864, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8925545324421583990, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
- target: {fileID: 9074506238497988532, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
propertyPath: isVisible
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects:
- {fileID: 6408542808343726725, guid: b341ab9d1c90ec94ca57298c7d0a4eeb, type: 3}
@@ -1105,7 +1237,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1144658963985576444, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_Enabled
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1144658963985576444, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_Controller
@@ -1121,7 +1253,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3118456698246916321, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_LocalPosition.x
value: 114.05
value: 114.3
objectReference: {fileID: 0}
- target: {fileID: 3118456698246916321, guid: 9ffbbbe0f32e84c418118cfd82141aa5, type: 3}
propertyPath: m_LocalPosition.y
@@ -2460,7 +2592,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_LocalPosition.z
value: 13.349998
value: 12.599998
objectReference: {fileID: 0}
- target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3}
propertyPath: m_LocalRotation.w

View File

@@ -5,13 +5,22 @@ using UnityEngine;
public class Checkpoint : MonoBehaviour
{
public bool isCollected = false;
public bool isVisible = true;
MeshRenderer meshRenderer;
private void Start() {
meshRenderer = GetComponent<MeshRenderer>();
}
private void Update() {
if (!isVisible)
{
meshRenderer.enabled = false;
return;
}
if (isCollected)
{
meshRenderer.enabled = false;