From 546abd28838846ff462221167cc817dddb15e82f Mon Sep 17 00:00:00 2001 From: Ciakon Date: Fri, 5 Apr 2024 11:25:37 +0200 Subject: [PATCH] L --- Assets/Scenes/AI Training.unity | 300 +++++++++++++++++++++++++++++-- Assets/Scripts/car control v2.cs | 2 +- 2 files changed, 282 insertions(+), 20 deletions(-) diff --git a/Assets/Scenes/AI Training.unity b/Assets/Scenes/AI Training.unity index 44582f6..e55055b 100644 --- a/Assets/Scenes/AI Training.unity +++ b/Assets/Scenes/AI Training.unity @@ -185,11 +185,54 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 450060be716600a46927ba00fb04135b, type: 3} +--- !u!1 &218143925 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + m_PrefabInstance: {fileID: 2124232202} + m_PrefabAsset: {fileID: 0} --- !u!4 &218143928 stripped Transform: m_CorrespondingSourceObject: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} m_PrefabInstance: {fileID: 2124232202} m_PrefabAsset: {fileID: 0} +--- !u!114 &218143929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 218143925} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a23c7d66d3ff94847a946cf7b30ca1b7, type: 3} + m_Name: + m_EditorClassIdentifier: + motorTorque: 2000 + brakeTorque: 2000 + maxSpeed: 20 + steeringRange: 30 +--- !u!64 &218143930 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 218143925} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 5 + m_Convex: 1 + m_CookingOptions: 30 + m_Mesh: {fileID: 0} --- !u!4 &257377415 stripped Transform: m_CorrespondingSourceObject: {fileID: 2129857982551333138, guid: 450060be716600a46927ba00fb04135b, type: 3} @@ -1002,13 +1045,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1047804915} serializedVersion: 2 - m_LocalRotation: {x: 0.43890285, y: -0, z: -0, w: 0.8985346} - m_LocalPosition: {x: 15, y: 72.6, z: -30.7} + m_LocalRotation: {x: 0.32650557, y: 0.6272114, z: -0.32650557, w: 0.6272114} + m_LocalPosition: {x: -27.1, y: 57.3, z: 30} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 52.068, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 55, y: 90, z: 0} --- !u!1001 &1050407802 PrefabInstance: m_ObjectHideFlags: 0 @@ -1394,26 +1437,94 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 977927543} m_Modifications: + - target: {fileID: 239808068493503110, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Drag + value: 0.1 + objectReference: {fileID: 0} + - target: {fileID: 239808068493503110, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Mass + value: 1500 + objectReference: {fileID: 0} + - target: {fileID: 599143912545070145, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4 + objectReference: {fileID: 0} + - target: {fileID: 613652968110647363, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 613652968110647363, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1082829397675514308, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: motorized value: 1 objectReference: {fileID: 0} - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_Mass - value: 20 + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Radius + value: 0.004 objectReference: {fileID: 0} - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_WheelDampingRate value: 0.25 objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SuspensionDistance + value: 0.001 + objectReference: {fileID: 0} - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.damper - value: 100 + value: 5000 objectReference: {fileID: 0} - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.spring value: 500 objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_Stiffness + value: 0.9 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_Stiffness + value: 0.95 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumSlip + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteSlip + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumValue + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_ExtremumSlip + value: 0.01 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteValue + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteSlip + value: 0.6 + objectReference: {fileID: 0} + - target: {fileID: 1993614641690278306, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteValue + value: 7.5 + objectReference: {fileID: 0} + - target: {fileID: 2390583446416444971, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4 + objectReference: {fileID: 0} - target: {fileID: 2599178774178468494, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: motorized value: 0 @@ -1444,23 +1555,23 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalPosition.z - value: 0 + value: 70 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalRotation.w - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalRotation.x - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalRotation.y - value: -0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalRotation.z - value: -0 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1468,64 +1579,215 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalEulerAnglesHint.y - value: 0 + value: 180 objectReference: {fileID: 0} - target: {fileID: 5049018613629602103, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: 6013378969511991378, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4 + objectReference: {fileID: 0} - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_Mass - value: 20 + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Radius + value: 0.004 objectReference: {fileID: 0} - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_WheelDampingRate value: 0.25 objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SuspensionDistance + value: 0.001 + objectReference: {fileID: 0} - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.damper - value: 100 + value: 5000 objectReference: {fileID: 0} - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.spring value: 500 objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_Stiffness + value: 0.9 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_Stiffness + value: 0.95 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumSlip + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteSlip + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumValue + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_ExtremumSlip + value: 0.01 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteValue + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteSlip + value: 0.6 + objectReference: {fileID: 0} + - target: {fileID: 6373920133476611951, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteValue + value: 7.5 + objectReference: {fileID: 0} - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_Mass - value: 20 + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Radius + value: 0.004 objectReference: {fileID: 0} - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_WheelDampingRate value: 0.25 objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SuspensionDistance + value: 0.001 + objectReference: {fileID: 0} - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.damper - value: 100 + value: 5000 objectReference: {fileID: 0} - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.spring value: 500 objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_Stiffness + value: 0.9 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_Stiffness + value: 0.95 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumSlip + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteSlip + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumValue + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_ExtremumSlip + value: 0.01 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteValue + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteSlip + value: 0.6 + objectReference: {fileID: 0} + - target: {fileID: 6950856957915183442, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteValue + value: 7.5 + objectReference: {fileID: 0} + - target: {fileID: 7320587279522380063, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_LocalPosition.y + value: 0.4 + objectReference: {fileID: 0} + - target: {fileID: 7565772832575379995, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Enabled + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_Mass - value: 20 + value: 50 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_Radius + value: 0.004 objectReference: {fileID: 0} - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_WheelDampingRate value: 0.25 objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SuspensionDistance + value: 0.001 + objectReference: {fileID: 0} - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.damper - value: 100 + value: 5000 objectReference: {fileID: 0} - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} propertyPath: m_SuspensionSpring.spring value: 500 objectReference: {fileID: 0} - m_RemovedComponents: [] + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_Stiffness + value: 0.9 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_Stiffness + value: 0.95 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumSlip + value: 0.2 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteSlip + value: 0.3 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_ExtremumValue + value: 0.8 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_ExtremumSlip + value: 0.01 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_ForwardFriction.m_AsymptoteValue + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteSlip + value: 0.6 + objectReference: {fileID: 0} + - target: {fileID: 8180478512642462433, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + propertyPath: m_SidewaysFriction.m_AsymptoteValue + value: 7.5 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 4562493253198073265, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} m_RemovedGameObjects: [] m_AddedGameObjects: [] - m_AddedComponents: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + insertIndex: -1 + addedObject: {fileID: 218143929} + - targetCorrespondingSourceObject: {fileID: 4258781391370674817, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} + insertIndex: -1 + addedObject: {fileID: 218143930} m_SourcePrefab: {fileID: 100100000, guid: 77e4cd38c4994de4f9312bea83b75104, type: 3} --- !u!1660057539 &9223372036854775807 SceneRoots: diff --git a/Assets/Scripts/car control v2.cs b/Assets/Scripts/car control v2.cs index 5044e17..d254b17 100644 --- a/Assets/Scripts/car control v2.cs +++ b/Assets/Scripts/car control v2.cs @@ -23,7 +23,7 @@ public class carcontrolv2 : MonoBehaviour } // Update is called once per frame - void Update() + void FixedUpdate() { float vInput = Input.GetAxis("Vertical");