diff --git a/Assets/ML-Agents/Timers/Racetrack mini_timers.json b/Assets/ML-Agents/Timers/Racetrack mini_timers.json index 09180c2..eee2e8f 100644 --- a/Assets/ML-Agents/Timers/Racetrack mini_timers.json +++ b/Assets/ML-Agents/Timers/Racetrack mini_timers.json @@ -1 +1 @@ -{"count":1,"self":38.019804799999996,"total":38.4003671,"children":{"InitializeActuators":{"count":1,"self":0.0010002,"total":0.0010002,"children":null},"InitializeSensors":{"count":1,"self":0.0020347,"total":0.0020347,"children":null},"AgentSendState":{"count":1669,"self":0.022292799999999998,"total":0.0491102,"children":{"CollectObservations":{"count":334,"self":0.012748599999999999,"total":0.012748599999999999,"children":null},"WriteActionMask":{"count":334,"self":0.0015183999999999998,"total":0.0015183999999999998,"children":null},"RequestDecision":{"count":334,"self":0.0125504,"total":0.0125504,"children":null}}},"DecideAction":{"count":1669,"self":0.2632692,"total":0.264296,"children":{"RayPerceptionSensor.Perceive":{"count":668,"self":0.0010268,"total":0.0010268,"children":null}}},"AgentAct":{"count":1669,"self":0.0626177,"total":0.0626177,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":1,"max":25.4457741,"min":25.4457741,"runningAverage":25.4457741,"value":25.4457741,"weightedAverage":25.4457741}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713633824","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":"1713633862"}} \ No newline at end of file +{"count":1,"self":42.998300799999996,"total":43.4843429,"children":{"InitializeActuators":{"count":1,"self":0.0009975,"total":0.0009975,"children":null},"InitializeSensors":{"count":1,"self":0.0035107,"total":0.0035107,"children":null},"AgentSendState":{"count":1884,"self":0.0346849,"total":0.0636719,"children":{"CollectObservations":{"count":377,"self":0.0123839,"total":0.0123839,"children":null},"WriteActionMask":{"count":377,"self":0.0010061999999999998,"total":0.0010061999999999998,"children":null},"RequestDecision":{"count":377,"self":0.015596899999999999,"total":0.015596899999999999,"children":null}}},"DecideAction":{"count":1884,"self":0.3403078,"total":0.3445643,"children":{"RayPerceptionSensor.Perceive":{"count":754,"self":0.0042565,"total":0.0042565,"children":null}}},"AgentAct":{"count":1884,"self":0.07230099999999999,"total":0.07230099999999999,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":1,"max":25.4530888,"min":25.4530888,"runningAverage":25.4530888,"value":25.4530888,"weightedAverage":25.4530888}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713641553","unity_version":"2022.3.11f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2022.3.11f1\\Editor\\Unity.exe -projectpath C:\\Users\\Magnus\\Desktop\\UnityStuf\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId bbb0aaf3-8271-4af0-b4cd-7f6b72fbe10b -accessToken RLm1ElgSaMlooMCc0_C3-0lLa7Ak20pME_OI2U67cZg005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1713641596"}} \ No newline at end of file diff --git a/Assets/Prefabs/Cars/Hotrod.prefab b/Assets/Prefabs/Cars/Hotrod.prefab index 449d505..b3c8a8b 100644 --- a/Assets/Prefabs/Cars/Hotrod.prefab +++ b/Assets/Prefabs/Cars/Hotrod.prefab @@ -1,5 +1,36 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &2478550314568077689 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1671451206055750931} + m_Layer: 0 + m_Name: LookAt + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1671451206055750931 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2478550314568077689} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: 4} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 5420764024659664985} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &5711380006811689493 GameObject: m_ObjectHideFlags: 0 @@ -31,8 +62,9 @@ Transform: m_LocalScale: {x: 0.25, y: 0.25, z: 0.25} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 7953198523918571078} + - {fileID: 1671451206055750931} - {fileID: 7580806137045057973} + - {fileID: 7953198523918571078} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!54 &3239213433477781764 @@ -80,6 +112,7 @@ MonoBehaviour: steeringRange: 9 steeringRangeAtMaxSpeed: 7 autoBrake: 100 + lookat: {fileID: 2478550314568077689} audio: {fileID: 7321855203641968658} rigidBody: {fileID: 0} --- !u!1 &5980600979410270282 diff --git a/Assets/Scenes/Racetrack mini.unity b/Assets/Scenes/Racetrack mini.unity index e74ba55..e85bafb 100644 --- a/Assets/Scenes/Racetrack mini.unity +++ b/Assets/Scenes/Racetrack mini.unity @@ -3928,8 +3928,8 @@ GameObject: m_Component: - component: {fileID: 279243548} - component: {fileID: 279243551} - - component: {fileID: 279243550} - component: {fileID: 279243552} + - component: {fileID: 279243553} m_Layer: 0 m_Name: cm m_TagString: Untagged @@ -3952,33 +3952,6 @@ Transform: m_Children: [] m_Father: {fileID: 1438942458} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &279243550 -MonoBehaviour: - m_ObjectHideFlags: 3 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 279243547} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3} - m_Name: - m_EditorClassIdentifier: - m_TrackedObjectOffset: {x: 0, y: 0, z: 0} - m_LookaheadTime: 0 - m_LookaheadSmoothing: 0 - m_LookaheadIgnoreY: 0 - m_HorizontalDamping: 0.5 - m_VerticalDamping: 0.5 - m_ScreenX: 0.5 - m_ScreenY: 0.5 - m_DeadZoneWidth: 0 - m_DeadZoneHeight: 0 - m_SoftZoneWidth: 0.8 - m_SoftZoneHeight: 0.8 - m_BiasX: 0 - m_BiasY: 0 - m_CenterOnActivate: 1 --- !u!114 &279243551 MonoBehaviour: m_ObjectHideFlags: 3 @@ -4003,18 +3976,45 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: bd6043bde05a7fc4cba197d06915c1e3, type: 3} m_Name: m_EditorClassIdentifier: - Damping: {x: 0.1, y: 0.5, z: 0.3} - ShoulderOffset: {x: 0.5, y: 1, z: 0} - VerticalArmLength: 0.4 + Damping: {x: 0, y: 0, z: 0} + ShoulderOffset: {x: 0, y: 0, z: 0} + VerticalArmLength: 1 CameraSide: 0.5 - CameraDistance: 4 + CameraDistance: 2 CameraCollisionFilter: serializedVersion: 2 m_Bits: 0 IgnoreTag: - CameraRadius: 0.2 + CameraRadius: 0.001 DampingIntoCollision: 0 - DampingFromCollision: 2 + DampingFromCollision: 0 +--- !u!114 &279243553 +MonoBehaviour: + m_ObjectHideFlags: 3 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 279243547} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4044717213e31446939f7bd49c896ea, type: 3} + m_Name: + m_EditorClassIdentifier: + m_TrackedObjectOffset: {x: 0, y: 0, z: 0} + m_LookaheadTime: 0.265 + m_LookaheadSmoothing: 6.2 + m_LookaheadIgnoreY: 0 + m_HorizontalDamping: 4.8 + m_VerticalDamping: 0.5 + m_ScreenX: 0.5 + m_ScreenY: 0.5 + m_DeadZoneWidth: 0 + m_DeadZoneHeight: 0 + m_SoftZoneWidth: 0.264 + m_SoftZoneHeight: 0.181 + m_BiasX: 0 + m_BiasY: 0 + m_CenterOnActivate: 1 --- !u!1001 &287427410 PrefabInstance: m_ObjectHideFlags: 0 @@ -7428,7 +7428,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &587494461 Transform: m_ObjectHideFlags: 0 @@ -17145,7 +17145,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!4 &1375563099 Transform: m_ObjectHideFlags: 0 @@ -17181,7 +17181,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} propertyPath: m_LocalPosition.z - value: 17.28 + value: 17.27 objectReference: {fileID: 0} - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} propertyPath: m_LocalRotation.w @@ -17220,6 +17220,11 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 5851f609a58dc884a99030da0105c6db, type: 3} +--- !u!4 &1427960685 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1671451206055750931, guid: 5851f609a58dc884a99030da0105c6db, type: 3} + m_PrefabInstance: {fileID: 1427960684} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1430263216 PrefabInstance: m_ObjectHideFlags: 0 @@ -17379,8 +17384,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1438942457} serializedVersion: 2 - m_LocalRotation: {x: 0.118471146, y: 0.6971116, z: -0.118471146, w: 0.6971116} - m_LocalPosition: {x: 7.6308975, y: -35.21663, z: 101.60594} + m_LocalRotation: {x: 0.16245987, y: 0.688191, z: -0.16245987, w: 0.688191} + m_LocalPosition: {x: 10.6308975, y: -35.366627, z: 101.59595} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -17405,8 +17410,8 @@ MonoBehaviour: m_StreamingVersion: 20170927 m_Priority: 10 m_StandbyUpdate: 2 - m_LookAt: {fileID: 1693759701} - m_Follow: {fileID: 1693759701} + m_LookAt: {fileID: 1427960685} + m_Follow: {fileID: 1427960685} m_Lens: FieldOfView: 60.000004 OrthographicSize: 5 @@ -20790,11 +20795,6 @@ MonoBehaviour: animator: {fileID: 1672243010} npcPrefab: {fileID: 153506, guid: 5e488cfd825ce044395037d93a9d8eb6, type: 3} audio: {fileID: 0} ---- !u!4 &1693759701 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - m_PrefabInstance: {fileID: 1427960684} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1697013554 PrefabInstance: m_ObjectHideFlags: 0 @@ -25002,8 +25002,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2049722134} serializedVersion: 2 - m_LocalRotation: {x: 0.118471146, y: 0.6971116, z: -0.118471146, w: 0.6971116} - m_LocalPosition: {x: 7.6308975, y: -35.21663, z: 101.60594} + m_LocalRotation: {x: 0.16245987, y: 0.688191, z: -0.16245987, w: 0.688191} + m_LocalPosition: {x: 10.6308975, y: -35.366627, z: 101.59595} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -26375,7 +26375,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3} propertyPath: m_LocalPosition.x - value: 77.27 + value: 62.847 objectReference: {fileID: 0} - target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3} propertyPath: m_LocalPosition.y @@ -26383,7 +26383,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3} propertyPath: m_LocalPosition.z - value: 12.599998 + value: 14.752 objectReference: {fileID: 0} - target: {fileID: 5026680989480309367, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3} propertyPath: m_LocalRotation.w @@ -26419,7 +26419,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7873748132333035523, guid: 9a80cc25f1296554a92f05347d4a024e, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] diff --git a/Assets/Scripts/car control v2.cs b/Assets/Scripts/car control v2.cs index 72e9934..fea0339 100644 --- a/Assets/Scripts/car control v2.cs +++ b/Assets/Scripts/car control v2.cs @@ -12,6 +12,7 @@ public class carcontrolv2 : MonoBehaviour public float autoBrake; + public GameObject lookat; public AudioSource audio; WheelControl[] wheels; @@ -108,6 +109,18 @@ public class carcontrolv2 : MonoBehaviour // wheel.WheelCollider.motorTorque = 0; } } + + //idk camera mobning rammer hårdt + float THINP = hInput/10; + if (THINP != hInput) + { + THINP+=hInput/10; + } + + + lookat.transform.localPosition = new Vector3 (THINP*1.5f,1,4); + + }