diff --git a/Assets/Imported Assets/PolygonCity/Prefabs/Characters/Character_BusinessMan_Shirt_01.prefab b/Assets/Imported Assets/PolygonCity/Prefabs/Characters/Character_BusinessMan_Shirt_01.prefab index 203811b..c1159e6 100644 --- a/Assets/Imported Assets/PolygonCity/Prefabs/Characters/Character_BusinessMan_Shirt_01.prefab +++ b/Assets/Imported Assets/PolygonCity/Prefabs/Characters/Character_BusinessMan_Shirt_01.prefab @@ -1758,7 +1758,7 @@ Transform: m_GameObject: {fileID: 153506} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -860.12476, y: 0, z: 100.35948} + m_LocalPosition: {x: -901.4196, y: 0, z: 100.35948} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: diff --git a/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_HDRP_v1.24.unitypackage.meta b/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_HDRP_v1.24.unitypackage.meta new file mode 100644 index 0000000..2f7eb2e --- /dev/null +++ b/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_HDRP_v1.24.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 58f7e79a87c79824597746e8c1bfe400 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_URP_v1.24.unitypackage.meta b/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_URP_v1.24.unitypackage.meta new file mode 100644 index 0000000..73c9a86 --- /dev/null +++ b/Assets/Imported Assets/SimpleNaturePack/SimpleNaturePack_2020.3_URP_v1.24.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f58d25b9e504a4f41ab4a71cf87c1845 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ML-Agents/Timers/Car Customization_timers.json b/Assets/ML-Agents/Timers/Car Customization_timers.json index 812b29f..f87c545 100644 --- a/Assets/ML-Agents/Timers/Car Customization_timers.json +++ b/Assets/ML-Agents/Timers/Car Customization_timers.json @@ -1 +1 @@ -{"count":1,"self":9.9214583999999988,"total":10.0039322,"children":{"InitializeActuators":{"count":3,"self":0.0015027999999999999,"total":0.0015027999999999999,"children":null},"InitializeSensors":{"count":3,"self":0.001,"total":0.001,"children":null},"AgentSendState":{"count":1,"self":0.0035026999999999997,"total":0.0157385,"children":{"CollectObservations":{"count":3,"self":0.0020212,"total":0.0020212,"children":null},"WriteActionMask":{"count":3,"self":0,"total":0,"children":null},"RequestDecision":{"count":3,"self":0.010214599999999999,"total":0.010214599999999999,"children":null}}},"DecideAction":{"count":1,"self":0.0632322,"total":0.0632322,"children":{"RayPerceptionSensor.Perceive":{"count":6,"self":0,"total":0,"children":null}}},"AgentAct":{"count":1,"self":0.0010000999999999999,"total":0.0010000999999999999,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713869954","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 249cbe37-b739-48da-be83-8703208ec644 -accessToken 8HP4BNN_d2rYa9gBqxxeXFjsh8NpNokVC4_Asgt7liQ005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Car Customization","end_time_seconds":"1713869964"}} \ No newline at end of file +{"count":1,"self":51.735008,"total":53.396893,"children":{"InitializeActuators":{"count":3,"self":0.0019952999999999998,"total":0.0019952999999999998,"children":null},"InitializeSensors":{"count":3,"self":0.0020442,"total":0.0020442,"children":null},"AgentSendState":{"count":2301,"self":0.1271256,"total":0.21599829999999998,"children":{"CollectObservations":{"count":1383,"self":0.0622806,"total":0.0622806,"children":null},"WriteActionMask":{"count":1383,"self":0.0059897,"total":0.0059897,"children":null},"RequestDecision":{"count":1383,"self":0.0206024,"total":0.0206024,"children":null}}},"DecideAction":{"count":2301,"self":1.155031,"total":1.1703040999999998,"children":{"RayPerceptionSensor.Perceive":{"count":2766,"self":0.0152731,"total":0.0152731,"children":null}}},"AgentAct":{"count":2301,"self":0.271543,"total":0.271543,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":4,"max":3.61319017,"min":-1.19209957,"runningAverage":0.7079615,"value":-0.3016693,"weightedAverage":0.19932358}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713879447","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\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 85628495-4bbf-4ebf-9a76-a3f42df70699 -accessToken EEPtwPFiPvta5ZqQMsucb3gRCkHIFV3-eB85wNbfCdI005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Car Customization","end_time_seconds":"1713879501"}} \ No newline at end of file diff --git a/Assets/ML-Agents/Timers/Racetrack mini_timers.json b/Assets/ML-Agents/Timers/Racetrack mini_timers.json index 928bf12..8c99c6c 100644 --- a/Assets/ML-Agents/Timers/Racetrack mini_timers.json +++ b/Assets/ML-Agents/Timers/Racetrack mini_timers.json @@ -1 +1 @@ -{"count":1,"self":153.1085824,"total":156.9964003,"children":{"InitializeActuators":{"count":1,"self":0.005389,"total":0.005389,"children":null},"InitializeSensors":{"count":1,"self":0.002791,"total":0.002791,"children":null},"AgentSendState":{"count":7588,"self":0.22169339999999998,"total":0.3273192,"children":{"CollectObservations":{"count":1518,"self":0.0730971,"total":0.0730971,"children":null},"WriteActionMask":{"count":1518,"self":0.0070043,"total":0.0070043,"children":null},"RequestDecision":{"count":1518,"self":0.0255244,"total":0.0255244,"children":null}}},"DecideAction":{"count":7588,"self":3.0653175999999998,"total":3.0896298,"children":{"RayPerceptionSensor.Perceive":{"count":3036,"self":0.0243121,"total":0.0243121,"children":null}}},"AgentAct":{"count":7588,"self":0.4597014,"total":0.4597014,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":5,"max":25.4343758,"min":11.6925583,"runningAverage":17.688221,"value":25.4338017,"weightedAverage":17.183569}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713876023","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\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 85628495-4bbf-4ebf-9a76-a3f42df70699 -accessToken EEPtwPFiPvta5ZqQMsucb3gRCkHIFV3-eB85wNbfCdI005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1713876180"}} +{"count":1,"self":92.9120832,"total":96.5726732,"children":{"InitializeActuators":{"count":3,"self":0.0029931999999999997,"total":0.0029931999999999997,"children":null},"InitializeSensors":{"count":3,"self":0.0030275999999999996,"total":0.0030275999999999996,"children":null},"AgentSendState":{"count":4577,"self":0.29683329999999997,"total":0.4523232,"children":{"CollectObservations":{"count":2748,"self":0.1129471,"total":0.1129471,"children":null},"WriteActionMask":{"count":2748,"self":0.0072223,"total":0.0072223,"children":null},"RequestDecision":{"count":2748,"self":0.0353205,"total":0.0353205,"children":null}}},"DecideAction":{"count":4577,"self":2.5310645999999997,"total":2.5676405,"children":{"RayPerceptionSensor.Perceive":{"count":5496,"self":0.0365759,"total":0.0365759,"children":null}}},"AgentAct":{"count":4577,"self":0.63164939999999992,"total":0.63164939999999992,"children":null}},"gauges":{"BensonV6.1.CumulativeReward":{"count":9,"max":7.858923,"min":-1.55353785,"runningAverage":1.28349817,"value":-1.43162537,"weightedAverage":0.562824965}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1713879512","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\\Ny unityting\\Racesm -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-Magnus -hubSessionId 85628495-4bbf-4ebf-9a76-a3f42df70699 -accessToken EEPtwPFiPvta5ZqQMsucb3gRCkHIFV3-eB85wNbfCdI005f","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Racetrack mini","end_time_seconds":"1713879609"}} \ No newline at end of file diff --git a/Assets/Scenes/Racetrack mini.unity b/Assets/Scenes/Racetrack mini.unity index 14ba047..3a2dda4 100644 --- a/Assets/Scenes/Racetrack mini.unity +++ b/Assets/Scenes/Racetrack mini.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.32107174, g: 0.21133253, b: 0.40438062, a: 1} + m_IndirectSpecularColor: {r: 0.32097125, g: 0.21131825, b: 0.40435025, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -1297,6 +1297,11 @@ MonoBehaviour: animator: {fileID: 39081967} npcPrefab: {fileID: 153506, guid: 5e488cfd825ce044395037d93a9d8eb6, type: 3} audio: {fileID: 0} +--- !u!4 &41967446 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 1288577159706020061, guid: a5cc261231f5a6a4c88239b1dab368cb, type: 3} + m_PrefabInstance: {fileID: 1495114367} + m_PrefabAsset: {fileID: 0} --- !u!1001 &51244679 PrefabInstance: m_ObjectHideFlags: 0 @@ -6178,10 +6183,14 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1742803291406415280, guid: 4d2790a368af4c4458fc4dc8130f8b19, type: 3} + propertyPath: Loader + value: + objectReference: {fileID: 556260502} - target: {fileID: 1742803291406415280, guid: 4d2790a368af4c4458fc4dc8130f8b19, type: 3} propertyPath: TargetCar value: - objectReference: {fileID: 1427960685} + objectReference: {fileID: 0} - target: {fileID: 1742803291406415280, guid: 4d2790a368af4c4458fc4dc8130f8b19, type: 3} propertyPath: CamerasPreset.Array.data[1].SetPositionSpeed value: 4 @@ -6255,6 +6264,11 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4d2790a368af4c4458fc4dc8130f8b19, type: 3} +--- !u!1 &454865285 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5442577508303945574, guid: 4d2790a368af4c4458fc4dc8130f8b19, type: 3} + m_PrefabInstance: {fileID: 454865284} + m_PrefabAsset: {fileID: 0} --- !u!1001 &464917649 PrefabInstance: m_ObjectHideFlags: 0 @@ -7233,7 +7247,8 @@ MonoBehaviour: - {fileID: 2100000, guid: de683385749d77b49a1cc4d8876323d8, type: 2} - {fileID: 2100000, guid: cb13a603242ea654885b9973cf7c97c0, type: 2} - {fileID: 2100000, guid: 290dcb9964b00e94bb0debc820182e71, type: 2} - vcam: {fileID: 1438942459} + cam: {fileID: 454865285} + targetcar: {fileID: 0} --- !u!4 &556260504 Transform: m_ObjectHideFlags: 0 @@ -9459,18 +9474,16 @@ Transform: - {fileID: 748442467} - {fileID: 1625559266} - {fileID: 993018533} - - {fileID: 1481385996} - {fileID: 846191461} - - {fileID: 454562554} - {fileID: 787070681} - {fileID: 539581455} - {fileID: 1140675707} - - {fileID: 1449944338} - {fileID: 1632493676} - {fileID: 898287533} - {fileID: 1924982538} - {fileID: 1953001437} - {fileID: 1551962693} + - {fileID: 41967446} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &742489084 @@ -18309,68 +18322,6 @@ MonoBehaviour: animator: {fileID: 1372193550} npcPrefab: {fileID: 153506, guid: 5e488cfd825ce044395037d93a9d8eb6, type: 3} audio: {fileID: 0} ---- !u!1001 &1427960684 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalPosition.x - value: 62.45 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalPosition.y - value: 0.06 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalPosition.z - value: 17.27 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalRotation.y - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90 - objectReference: {fileID: 0} - - target: {fileID: 5420764024659664985, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5711380006811689493, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - propertyPath: m_Name - value: Hotrod - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 5851f609a58dc884a99030da0105c6db, type: 3} ---- !u!1 &1427960685 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 5711380006811689493, guid: 5851f609a58dc884a99030da0105c6db, type: 3} - m_PrefabInstance: {fileID: 1427960684} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1430263216 PrefabInstance: m_ObjectHideFlags: 0 @@ -19052,7 +19003,7 @@ PrefabInstance: - target: {fileID: 281105538288573982, guid: 420cdad33b21c264392db22c65595f6d, type: 3} propertyPath: PlayerCar value: - objectReference: {fileID: 1427960685} + objectReference: {fileID: 350793952} - target: {fileID: 2362900685038639990, guid: 420cdad33b21c264392db22c65595f6d, type: 3} propertyPath: m_Name value: GameController @@ -19106,6 +19057,11 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 420cdad33b21c264392db22c65595f6d, type: 3} +--- !u!1 &1493536274 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 3636523566108256591, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} + m_PrefabInstance: {fileID: 788662682} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1495114367 PrefabInstance: m_ObjectHideFlags: 0 @@ -19167,16 +19123,6 @@ PrefabInstance: m_AddedGameObjects: [] m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: a5cc261231f5a6a4c88239b1dab368cb, type: 3} ---- !u!4 &1481385996 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 1288577159706020061, guid: a5cc261231f5a6a4c88239b1dab368cb, type: 3} - m_PrefabInstance: {fileID: 1481385995} - m_PrefabAsset: {fileID: 0} ---- !u!1 &1493536274 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 3636523566108256591, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - m_PrefabInstance: {fileID: 788662682} - m_PrefabAsset: {fileID: 0} --- !u!1001 &1508352113 PrefabInstance: m_ObjectHideFlags: 0 @@ -26552,63 +26498,6 @@ MonoBehaviour: animator: {fileID: 2019051411} npcPrefab: {fileID: 153506, guid: 5e488cfd825ce044395037d93a9d8eb6, type: 3} audio: {fileID: 0} ---- !u!1001 &2047826617 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 9044108803436088291, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_Name - value: SchoolBus - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalPosition.x - value: 64.31719 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalPosition.y - value: 0.25099647 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalPosition.z - value: 14.522134 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalRotation.w - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalRotation.y - value: 0.7071068 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 90 - objectReference: {fileID: 0} - - target: {fileID: 9048518517659192843, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 9f63749b266355c4c8f8f5a8529d34cb, type: 3} --- !u!1001 &2053969745 PrefabInstance: m_ObjectHideFlags: 0 @@ -28173,7 +28062,6 @@ SceneRoots: - {fileID: 741699578} - {fileID: 998358590} - {fileID: 323815922} - - {fileID: 1205272008} - - {fileID: 2047826617} - {fileID: 454865284} - {fileID: 1492327422} + - {fileID: 556260504} diff --git a/Assets/Scripts/CameraControl.cs b/Assets/Scripts/CameraControl.cs index 53ef26a..31b010b 100644 --- a/Assets/Scripts/CameraControl.cs +++ b/Assets/Scripts/CameraControl.cs @@ -17,14 +17,12 @@ public class CameraControl :MonoBehaviour int ActivePresetIndex = 0; CameraPreset ActivePreset; - + public GameObject Loader; public GameObject TargetCar; GameController GameController { get { return GameController.Instance; } } float SqrMinDistance; - - Vector3 TargetPoint { get @@ -41,10 +39,19 @@ public class CameraControl :MonoBehaviour } } + public void getCar(GameObject car) + { + TargetCar = car; + } + + + private void Awake() { CamerasPreset.ForEach (c => c.CameraHolder.SetActive(false)); UpdateActiveCamera (); + //TargetCar = Loader.GetComponent().targetcar; + if (NextCameraButton) { NextCameraButton.onClick.AddListener (SetNextCamera); @@ -67,8 +74,12 @@ public class CameraControl :MonoBehaviour } } + + private IEnumerator Start () { + // TargetCar = Loader.GetComponent().targetcar; + while (GameController == null) { yield return null; diff --git a/Assets/Scripts/Car Loader.cs b/Assets/Scripts/Car Loader.cs index 366a599..5a153c4 100644 --- a/Assets/Scripts/Car Loader.cs +++ b/Assets/Scripts/Car Loader.cs @@ -10,7 +10,9 @@ public class CarLoader : MonoBehaviour string carType; string carColor; public Material[] Colors; - public CinemachineVirtualCamera vcam; + public GameObject cam; + + public GameObject targetcar; void Start() { carType = GameObject.Find("Car Data").GetComponent().carType; @@ -30,8 +32,8 @@ public class CarLoader : MonoBehaviour car.GetComponent().enabled = true; car.GetComponent().enabled = false; - vcam.Follow = car.transform; - vcam.LookAt = car.transform; + cam.GetComponent().getCar(car); + //LookAt = car.transform; if (color == "Default") {