diff --git a/autocopylot/Assets/Packages/PathCreator/Core/Runtime/Objects/BezierPath.cs b/autocopylot/Assets/Packages/PathCreator/Core/Runtime/Objects/BezierPath.cs index a3912b2..9fd5c74 100644 --- a/autocopylot/Assets/Packages/PathCreator/Core/Runtime/Objects/BezierPath.cs +++ b/autocopylot/Assets/Packages/PathCreator/Core/Runtime/Objects/BezierPath.cs @@ -361,7 +361,7 @@ public void MovePoint (int i, Vector3 pointPos, bool suppressPathModifiedEvent = points[i] = pointPos; if (controlMode == ControlMode.Automatic) { - AutoSetAllAffectedControlPoints (i); + AutoSetAllControlPoints(); } else { // Move control points with anchor point if (isAnchorPoint) { diff --git a/autocopylot/Assets/Resources/Floors/floor_pattern.png.meta b/autocopylot/Assets/Resources/Floors/floor_pattern.png.meta index 99aa1b9..dab0871 100644 --- a/autocopylot/Assets/Resources/Floors/floor_pattern.png.meta +++ b/autocopylot/Assets/Resources/Floors/floor_pattern.png.meta @@ -6,7 +6,7 @@ TextureImporter: serializedVersion: 11 mipmaps: mipMapMode: 0 - enableMipMap: 1 + enableMipMap: 0 sRGBTexture: 1 linearTexture: 0 fadeOut: 0 @@ -32,7 +32,7 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 + filterMode: 0 aniso: -1 mipBias: -100 wrapU: -1 @@ -75,6 +75,18 @@ TextureImporter: overridden: 0 androidETC2FallbackOverride: 0 forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 spriteSheet: serializedVersion: 2 sprites: [] diff --git a/autocopylot/Assets/Scenes/RandomizedTrack.unity b/autocopylot/Assets/Scenes/RandomizedTrack.unity index 317b719..af8fd00 100644 --- a/autocopylot/Assets/Scenes/RandomizedTrack.unity +++ b/autocopylot/Assets/Scenes/RandomizedTrack.unity @@ -1316,7 +1316,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-21298 + m_Name: pb_Mesh-1368 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -1638,10 +1638,10 @@ Light: m_Type: 2 m_Resolution: -1 m_CustomResolution: -1 - m_Strength: 0.5 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 + m_Strength: 1 + m_Bias: 0.01 + m_NormalBias: 0 + m_NearPlane: 0.1 m_CullingMatrixOverride: e00: 1 e01: 0 diff --git a/autocopylot/Assets/Scenes/RenaultDigital.unity b/autocopylot/Assets/Scenes/RenaultDigital.unity index 2018161..c89f8c8 100644 --- a/autocopylot/Assets/Scenes/RenaultDigital.unity +++ b/autocopylot/Assets/Scenes/RenaultDigital.unity @@ -1948,171 +1948,171 @@ MonoBehaviour: editorData: _bezierPath: points: - - {x: -2.1461494, y: 1.760967, z: -1.8785375} - - {x: -2.1795676, y: 1.7491598, z: -1.6374161} - - {x: -2.1422827, y: 1.8676028, z: -1.2727362} - - {x: -1.9978329, y: 1.8209426, z: -1.082072} - - {x: -1.8175483, y: 1.7627071, z: -0.8441082} - - {x: -1.4489644, y: 1.4438587, z: -0.7403073} - - {x: -1.1480033, y: 1.4117818, z: -0.7100707} - - {x: -0.9034507, y: 1.3857169, z: -0.68550134} - - {x: -0.54111034, y: 1.5186311, z: -0.71248543} - - {x: -0.3576173, y: 1.5864139, z: -0.8635643} - - {x: -0.21926811, y: 1.6375203, z: -0.977474} - - {x: -0.25225753, y: 1.7197187, z: -1.276653} - - {x: -0.13799317, y: 1.7560136, z: -1.419321} - - {x: 0.059364617, y: 1.8187023, z: -1.6657374} - - {x: 0.44964305, y: 1.9727943, z: -1.9409479} - - {x: 0.739061, y: 1.8621597, z: -2.0281157} - - {x: 1.0073795, y: 1.7595907, z: -2.108929} - - {x: 1.2290516, y: 1.2619832, z: -2.10092} - - {x: 1.454825, y: 1.1793141, z: -1.9241767} - - {x: 1.6370049, y: 1.1126074, z: -1.7815601} - - {x: 1.7877221, y: 1.3177934, z: -1.4773189} - - {x: 1.8446565, y: 1.3760929, z: -1.250739} - - {x: 1.9104625, y: 1.4434768, z: -0.9888527} - - {x: 1.8096967, y: 1.5030228, z: -0.61340976} - - {x: 1.8168784, y: 1.5815871, z: -0.34651738} - - {x: 1.8249903, y: 1.670326, z: -0.045060337} - - {x: 1.9030329, y: 2.000318, z: 0.32647812} - - {x: 1.9021425, y: 1.9389875, z: 0.63478726} - - {x: 1.90126, y: 1.8781972, z: 0.94037986} - - {x: 1.9478607, y: 1.2842966, z: 1.1202266} - - {x: 1.8126187, y: 1.2395582, z: 1.3973389} - - {x: 1.7085327, y: 1.2051263, z: 1.6106123} - - {x: 1.5542501, y: 1.6072947, z: 1.8321686} - - {x: 1.3353503, y: 1.5971849, z: 1.9295629} - - {x: 1.0813532, y: 1.5854541, z: 2.042573} - - {x: 0.80159503, y: 1.0796444, z: 1.9987787} - - {x: 0.5402554, y: 1.1199205, z: 1.9121597} - - {x: 0.2670759, y: 1.1620213, z: 1.8216164} - - {x: 0.22951502, y: 1.7763238, z: 1.6916802} - - {x: 0.030057203, y: 1.8255223, z: 1.4857829} - - {x: -0.14138325, y: 1.86781, z: 1.3088075} - - {x: -0.22157925, y: 1.4743024, z: 1.0308231} - - {x: -0.4403847, y: 1.443243, z: 0.9139477} - - {x: -0.6612549, y: 1.4118905, z: 0.79596937} - - {x: -1.0020912, y: 1.6424528, z: 0.7549659} - - {x: -1.2493144, y: 1.6468928, z: 0.8054286} - - {x: -1.4498148, y: 1.6504936, z: 0.84635437} - - {x: -1.6903553, y: 1.4736984, z: 0.99228424} - - {x: -1.8237053, y: 1.5038288, z: 1.1445938} - - {x: -1.9964354, y: 1.542857, z: 1.3418826} - - {x: -2.093327, y: 1.8958783, z: 1.6089177} - - {x: -2.1018655, y: 1.920102, z: 1.8727777} - - {x: -2.112971, y: 1.9516087, z: 2.2159674} - - {x: -1.9586025, y: 1.7677191, z: 2.6936836} - - {x: -1.8047347, y: 1.5621138, z: 2.9237843} - - {x: -1.7101965, y: 1.4357874, z: 3.0651608} - - {x: -1.6084385, y: 1.0780212, z: 3.085506} - - {x: -1.4129498, y: 1.0145987, z: 3.1369343} - - {x: -1.1163299, y: 0.9183662, z: 3.2149677} - - {x: -0.7008451, y: 1.2368909, z: 3.2187436} - - {x: -0.39123625, y: 1.3210194, z: 3.238693} - - {x: -0.14116731, y: 1.3889694, z: 3.254806} - - {x: 0.19637388, y: 1.4678533, z: 3.2738445} - - {x: 0.44918862, y: 1.5261259, z: 3.263829} - - {x: 0.831255, y: 1.6141905, z: 3.248693} - - {x: 1.3278543, y: 1.7956512, z: 3.1225553} - - {x: 1.7201726, y: 1.8018652, z: 3.1251748} - - {x: 2.262874, y: 1.8104612, z: 3.1287985} - - {x: 2.946739, y: 1.4358244, z: 3.3762903} - - {x: 3.4868283, y: 1.4762604, z: 3.340514} - - {x: 3.669327, y: 1.489924, z: 3.328425} - - {x: 3.8640363, y: 1.6618792, z: 3.210232} - - {x: 4.0461197, y: 1.6728514, z: 3.1911578} - - {x: 4.3816886, y: 1.6930727, z: 3.1560051} - - {x: 4.811656, y: 1.4175644, z: 3.2071207} - - {x: 5.1470613, y: 1.4389999, z: 3.2431078} - - {x: 5.468382, y: 1.4595352, z: 3.2775838} - - {x: 5.8358994, y: 1.742884, z: 3.4637926} - - {x: 6.1516976, y: 1.7946427, z: 3.4142966} - - {x: 6.353669, y: 1.8277454, z: 3.382641} - - {x: 6.6396995, y: 1.777869, z: 3.2684689} - - {x: 6.7696376, y: 1.7737756, z: 3.1072557} - - {x: 6.931884, y: 1.7686644, z: 2.9059587} - - {x: 6.9634495, y: 1.7497219, z: 2.5288315} - - {x: 6.9806643, y: 1.7688758, z: 2.271524} - - {x: 6.998003, y: 1.7881677, z: 2.0123641} - - {x: 6.955271, y: 1.9895769, z: 1.6521797} - - {x: 6.8814673, y: 1.8999294, z: 1.4190426} - - {x: 6.8014264, y: 1.8027053, z: 1.1662017} - - {x: 6.74715, y: 1.2976958, z: 1.0482142} - - {x: 6.5304937, y: 1.2008038, z: 0.8950486} - - {x: 6.320621, y: 1.1069454, z: 0.7466787} - - {x: 5.959234, y: 1.382776, z: 0.5207402} - - {x: 5.691863, y: 1.3509443, z: 0.5694114} - - {x: 5.4744163, y: 1.3250562, z: 0.60899454} - - {x: 5.320542, y: 1.1267359, z: 0.87257695} - - {x: 5.1912684, y: 1.0880405, z: 1.0495267} - - {x: 4.999979, y: 1.0307819, z: 1.3113638} - - {x: 4.971623, y: 1.0688695, z: 1.8517004} - - {x: 4.69711, y: 1.107423, z: 2.0294228} - - {x: 4.5233374, y: 1.1318282, z: 2.141925} - - {x: 4.2177176, y: 1.2005408, z: 2.0848227} - - {x: 4.0145235, y: 1.2349507, z: 2.0535588} - - {x: 3.7761953, y: 1.2753103, z: 2.016889} - - {x: 3.413546, y: 1.3187879, z: 1.9673877} - - {x: 3.2537055, y: 1.349792, z: 1.7850044} - - {x: 3.0905714, y: 1.3814349, z: 1.5988629} - - {x: 3.1170673, y: 1.3711421, z: 1.2168611} - - {x: 3.0796254, y: 1.416966, z: 0.97445464} - - {x: 3.0327995, y: 1.4742745, z: 0.67129433} - - {x: 2.9773123, y: 1.7505169, z: 0.29088688} - - {x: 2.9873633, y: 1.7123191, z: -0.018666029} - - {x: 3.0002735, y: 1.6632556, z: -0.41627434} - - {x: 3.0551486, y: 1.0965439, z: -0.77915645} - - {x: 3.1841438, y: 1.0354804, z: -1.1537199} - - {x: 3.2728744, y: 0.99347717, z: -1.4113674} - - {x: 3.4037895, y: 1.1012715, z: -1.8082314} - - {x: 3.5920663, y: 1.2438742, z: -1.9504848} - - {x: 3.7516892, y: 1.3647742, z: -2.0710886} - - {x: 3.939998, y: 1.7411636, z: -2.0087674} - - {x: 4.169541, y: 1.7665241, z: -1.9725951} - - {x: 4.4537063, y: 1.7979194, z: -1.9278152} - - {x: 4.7819967, y: 1.4110323, z: -1.8957303} - - {x: 4.9629097, y: 1.2861404, z: -1.707546} - - {x: 5.1306586, y: 1.1703364, z: -1.5330551} - - {x: 5.051528, y: 0.99200964, z: -1.081731} - - {x: 5.2425075, y: 1.0307084, z: -0.89726794} - - {x: 5.445721, y: 1.0718863, z: -0.7009882} - - {x: 5.7524014, y: 1.4817929, z: -0.690153} - - {x: 6.0343704, y: 1.5232465, z: -0.7072522} - - {x: 6.2926903, y: 1.5612234, z: -0.7229173} - - {x: 6.6524787, y: 1.2229452, z: -0.7989839} - - {x: 6.83284, y: 1.2960565, z: -0.9737451} - - {x: 7.029571, y: 1.3758036, z: -1.1643682} - - {x: 6.942527, y: 1.8894281, z: -1.3743112} - - {x: 6.9624233, y: 1.9494401, z: -1.6525245} - - {x: 6.9811225, y: 2.0058403, z: -1.9139942} - - {x: 7.0392604, y: 1.7115397, z: -2.2510881} - - {x: 6.9466, y: 1.6549822, z: -2.4962664} - - {x: 6.8633056, y: 1.6041414, z: -2.7166624} - - {x: 6.6382933, y: 1.5610125, z: -2.9869943} - - {x: 6.4395185, y: 1.601485, z: -3.1171775} - - {x: 6.2852554, y: 1.6328944, z: -3.2182086} - - {x: 6.065186, y: 1.8475174, z: -3.2351475} - - {x: 5.880012, y: 1.8370496, z: -3.2594779} - - {x: 5.491337, y: 1.8150781, z: -3.3105466} - - {x: 5.1156163, y: 1.2879972, z: -3.2625823} - - {x: 4.730577, y: 1.2112411, z: -3.2661245} - - {x: 4.463933, y: 1.1580867, z: -3.2685776} - - {x: 4.099949, y: 1.2801983, z: -3.2763236} - - {x: 3.829302, y: 1.3062758, z: -3.277136} - - {x: 2.8291173, y: 1.4026461, z: -3.2801385} - - {x: 1.4749336, y: 1.3861454, z: -3.2669802} - - {x: 0.49264556, y: 1.5974867, z: -3.2564564} - - {x: 0.23453677, y: 1.6530194, z: -3.2536912} - - {x: -0.07689756, y: 1.8494796, z: -3.2521274} - - {x: -0.33791855, y: 1.8882995, z: -3.243599} - - {x: -0.63290834, y: 1.9321713, z: -3.2339604} - - {x: -1.060433, y: 1.8249094, z: -3.3200011} - - {x: -1.3305008, y: 1.8468605, z: -3.1950285} - - {x: -1.4699584, y: 1.8581957, z: -3.130495} - - {x: -1.5862372, y: 1.936873, z: -2.9507892} - - {x: -1.6738524, y: 1.9378263, z: -2.824045} - - {x: -1.856654, y: 1.9398152, z: -2.5596037} - - {x: -2.1020675, y: 1.7765418, z: -2.1966} + - {x: -1.9268842, y: 1.2973928, z: -1.8828608} + - {x: -1.9568955, y: 1.2966832, z: -1.6395303} + - {x: -2.0583549, y: 1.39801, z: -1.2943121} + - {x: -1.956328, y: 1.4788902, z: -1.0865626} + - {x: -1.8577033, y: 1.5570734, z: -0.88574046} + - {x: -1.5787314, y: 1.7491189, z: -0.7188405} + - {x: -1.346706, y: 1.7641503, z: -0.6729355} + - {x: -1.0435343, y: 1.7837906, z: -0.61295456} + - {x: -0.62180626, y: 1.4698362, z: -0.6923803} + - {x: -0.365073, y: 1.5066164, z: -0.86158967} + - {x: -0.16352415, y: 1.5354906, z: -0.99442774} + - {x: -0.13836288, y: 1.8994075, z: -1.2894726} + - {x: 0.018009625, y: 1.8740774, z: -1.4738842} + - {x: 0.20590943, y: 1.8436403, z: -1.6954763} + - {x: 0.3519935, y: 1.4125212, z: -1.9085753} + - {x: 0.59737504, y: 1.2641163, z: -1.9642498} + - {x: 0.7907389, y: 1.1471713, z: -2.0081222} + - {x: 1.1088763, y: 0.9775027, z: -1.9214956} + - {x: 1.319049, y: 1.0321939, z: -1.8451619} + - {x: 1.6389835, y: 1.1154474, z: -1.7289634} + - {x: 1.8530123, y: 1.7878829, z: -1.6846702} + - {x: 2.0086036, y: 1.8505422, z: -1.3770071} + - {x: 2.121881, y: 1.896161, z: -1.1530147} + - {x: 2.0648875, y: 1.5158161, z: -0.86639065} + - {x: 2.064885, y: 1.4795883, z: -0.61385745} + - {x: 2.0648816, y: 1.4317975, z: -0.2807222} + - {x: 2.0327728, y: 1.7045196, z: 0.15815115} + - {x: 1.9906186, y: 1.6661847, z: 0.48983848} + - {x: 1.9537199, y: 1.6326289, z: 0.78017414} + - {x: 1.9555303, y: 1.2284244, z: 1.125467} + - {x: 1.8197232, y: 1.2883213, z: 1.3799293} + - {x: 1.7110083, y: 1.3362693, z: 1.583629} + - {x: 1.5843865, y: 1.7678227, z: 1.6264777} + - {x: 1.3876095, y: 1.8417217, z: 1.7333856} + - {x: 1.1517661, y: 1.9302919, z: 1.861518} + - {x: 0.7699194, y: 1.8056477, z: 2.1327527} + - {x: 0.5169274, y: 1.6999317, z: 2.0641673} + - {x: 0.261502, y: 1.5931989, z: 1.9949222} + - {x: 0.2068823, y: 1.3886173, z: 1.5604843} + - {x: 0.03657911, y: 1.2750404, z: 1.3616726} + - {x: -0.088859074, y: 1.1913844, z: 1.2152363} + - {x: -0.2557884, y: 1.0460876, z: 1.0082873} + - {x: -0.44062415, y: 1.0337905, z: 0.90898395} + - {x: -0.6707141, y: 1.0184826, z: 0.78536767} + - {x: -1.0447305, y: 1.1021259, z: 0.6763008} + - {x: -1.2645679, y: 1.2397684, z: 0.71069235} + - {x: -1.517813, y: 1.3983278, z: 0.7503102} + - {x: -1.661844, y: 1.9381237, z: 0.9140482} + - {x: -1.8148723, y: 1.9413162, z: 1.1736939} + - {x: -2.0043669, y: 1.9452696, z: 1.4952128} + - {x: -1.957656, y: 1.223584, z: 1.716612} + - {x: -1.9956268, y: 1.0905782, z: 2.0632615} + - {x: -2.0143764, y: 1.0249009, z: 2.2344346} + - {x: -2.077186, y: 1.0234686, z: 2.5220392} + - {x: -2.0216937, y: 1.1067107, z: 2.6768186} + - {x: -1.9295713, y: 1.2449002, z: 2.9337668} + - {x: -1.7457147, y: 1.7843828, z: 2.9955404} + - {x: -1.463839, y: 1.8518345, z: 3.0935287} + - {x: -1.1550064, y: 1.9257369, z: 3.2008882} + - {x: -0.75160414, y: 1.537297, z: 3.1758606} + - {x: -0.4363557, y: 1.4275825, z: 3.2066236} + - {x: -0.1658546, y: 1.3334413, z: 3.2330198} + - {x: 0.20026755, y: 1.2195239, z: 3.2724693} + - {x: 0.48239702, y: 1.1650327, z: 3.2852697} + - {x: 0.92778563, y: 1.0790093, z: 3.3054774} + - {x: 1.5488901, y: 0.89343995, z: 3.3110256} + - {x: 1.9878258, y: 1.0086145, z: 3.2952223} + - {x: 2.4398184, y: 1.1272153, z: 3.2789488} + - {x: 2.788282, y: 1.9349772, z: 3.1862662} + - {x: 3.2551281, y: 1.9089878, z: 3.1835325} + - {x: 3.6068487, y: 1.8894074, z: 3.1814728} + - {x: 3.7780356, y: 1.149293, z: 3.249762} + - {x: 4.1296372, y: 1.1288118, z: 3.256967} + - {x: 4.493387, y: 1.1076231, z: 3.2644212} + - {x: 4.7679086, y: 1.748963, z: 3.2201557} + - {x: 5.1242657, y: 1.8253051, z: 3.2199173} + - {x: 5.389036, y: 1.8820268, z: 3.2197402} + - {x: 5.7719617, y: 1.7747835, z: 3.2946649} + - {x: 6.0104403, y: 1.655976, z: 3.246358} + - {x: 6.2470603, y: 1.5380946, z: 3.1984274} + - {x: 6.433382, y: 1.0831045, z: 3.1155047} + - {x: 6.616801, y: 1.0838623, z: 2.9191902} + - {x: 6.824198, y: 1.0847192, z: 2.6972115} + - {x: 6.9037275, y: 1.6753145, z: 2.5087533} + - {x: 6.936872, y: 1.7349235, z: 2.212718} + - {x: 6.9684453, y: 1.7917063, z: 1.9307183} + - {x: 6.9166284, y: 1.5080867, z: 1.5634236} + - {x: 6.808889, y: 1.4328985, z: 1.305579} + - {x: 6.7668796, y: 1.4035816, z: 1.2050418} + - {x: 6.6820774, y: 1.354536, z: 1.0712265} + - {x: 6.58751, y: 1.3613434, z: 1.0100492} + - {x: 6.368323, y: 1.3771213, z: 0.86825335} + - {x: 6.0312014, y: 1.6542827, z: 0.8010345} + - {x: 5.7740707, y: 1.6226833, z: 0.8368571} + - {x: 5.546737, y: 1.5947456, z: 0.8685284} + - {x: 5.3638225, y: 1.2310427, z: 1.0081127} + - {x: 5.1990156, y: 1.232577, z: 1.1702871} + - {x: 4.9581456, y: 1.2348194, z: 1.4073101} + - {x: 4.9881773, y: 1.7626057, z: 1.822777} + - {x: 4.7036815, y: 1.8151648, z: 1.9974279} + - {x: 4.518143, y: 1.8494421, z: 2.1113293} + - {x: 4.2192116, y: 1.6329771, z: 2.1090987} + - {x: 3.9999478, y: 1.624912, z: 2.0883274} + - {x: 3.7515798, y: 1.6157764, z: 2.0647988} + - {x: 3.3878965, y: 1.7909461, z: 2.0232143} + - {x: 3.2227154, y: 1.7825089, z: 1.8362178} + - {x: 3.046662, y: 1.7735162, z: 1.6369131} + - {x: 3.07464, y: 1.6291671, z: 1.2487159} + - {x: 3.0669487, y: 1.5642693, z: 0.99078745} + - {x: 3.055644, y: 1.468884, z: 0.61169} + - {x: 3.1897142, y: 1.2344192, z: 0.12279728} + - {x: 3.2213488, y: 1.2560596, z: -0.26639676} + - {x: 3.2459831, y: 1.2729113, z: -0.5694675} + - {x: 3.2079597, y: 1.6258367, z: -0.9199615} + - {x: 3.2581599, y: 1.6034968, z: -1.2195004} + - {x: 3.2951322, y: 1.5870435, z: -1.4401093} + - {x: 3.2957368, y: 1.2359613, z: -1.689136} + - {x: 3.4539583, y: 1.2484128, z: -1.8476192} + - {x: 3.7035708, y: 1.2680565, z: -2.0976448} + - {x: 4.0637193, y: 1.8106027, z: -2.1819978} + - {x: 4.3964963, y: 1.9070827, z: -2.1101913} + - {x: 4.594224, y: 1.9644088, z: -2.0675256} + - {x: 4.8471045, y: 1.8418247, z: -1.8817401} + - {x: 4.968296, y: 1.8438628, z: -1.709951} + - {x: 5.117531, y: 1.8463725, z: -1.4984107} + - {x: 5.029041, y: 2.022627, z: -1.0617137} + - {x: 5.195489, y: 1.9373733, z: -0.882679} + - {x: 5.419487, y: 1.8226424, z: -0.6417421} + - {x: 5.732573, y: 1.219665, z: -0.6855893} + - {x: 6.0791636, y: 1.2023157, z: -0.7166206} + - {x: 6.3435955, y: 1.1890789, z: -0.740296} + - {x: 6.603053, y: 1.5646209, z: -0.80746114} + - {x: 6.7724347, y: 1.6946769, z: -0.9657491} + - {x: 6.93212, y: 1.8172876, z: -1.1149755} + - {x: 7.0838604, y: 1.9686494, z: -1.4171734} + - {x: 7.1172643, y: 1.9971107, z: -1.6639029} + - {x: 7.1514754, y: 2.02626, z: -1.9165947} + - {x: 7.0813355, y: 1.8716102, z: -2.2641077} + - {x: 6.973701, y: 1.8659555, z: -2.497037} + - {x: 6.871624, y: 1.8605927, z: -2.7179387} + - {x: 6.663558, y: 1.9917557, z: -2.9913197} + - {x: 6.4582295, y: 1.9561049, z: -3.1170785} + - {x: 6.2523394, y: 1.9203565, z: -3.2431812} + - {x: 5.9490833, y: 1.7284864, z: -3.2415469} + - {x: 5.7198606, y: 1.6477621, z: -3.2641518} + - {x: 5.4182696, y: 1.5415522, z: -3.2938936} + - {x: 5.0094013, y: 1.3012979, z: -3.2656822} + - {x: 4.691892, y: 1.3493156, z: -3.2678232} + - {x: 4.389073, y: 1.3951118, z: -3.2698653} + - {x: 4.132962, y: 1.8233865, z: -3.276491} + - {x: 3.8395305, y: 1.9111292, z: -3.2766802} + - {x: 2.946259, y: 2.1782374, z: -3.2772563} + - {x: 1.6475601, y: 2.080898, z: -3.260385} + - {x: 0.7317804, y: 1.9060271, z: -3.2533944} + - {x: 0.33530974, y: 1.8303198, z: -3.2503679} + - {x: -0.12525323, y: 1.495355, z: -3.2625222} + - {x: -0.5198154, y: 1.412323, z: -3.2436512} + - {x: -0.6912422, y: 1.3762478, z: -3.2354522} + - {x: -0.9351327, y: 1.377115, z: -3.2469225} + - {x: -1.1018524, y: 1.3899052, z: -3.1940384} + - {x: -1.3124182, y: 1.4060593, z: -3.1272461} + - {x: -1.5978085, y: 1.5285361, z: -3.0045729} + - {x: -1.7274488, y: 1.522608, z: -2.825078} + - {x: -1.9011194, y: 1.5146666, z: -2.5846207} + - {x: -1.890563, y: 1.2982517, z: -2.1773508} isClosed: 1 space: 0 controlMode: 3 @@ -2251,7 +2251,7 @@ MonoBehaviour: showVertexPathOptions: 1 showNormals: 0 showNormalsHelpInfo: 0 - tabIndex: 1 + tabIndex: 0 initialized: 1 --- !u!1001 &1702402483 PrefabInstance: @@ -2459,21 +2459,21 @@ MonoBehaviour: - {x: -0.8665877, y: 0, z: -0.6382358} - {x: -0.5807706, y: 0, z: -0.7513235} - {x: -0.26743355, y: 0, z: -0.87529993} - - {x: -0.11183907, y: 0, z: -1.3917054} + - {x: -0.11565314, y: 0, z: -1.3964361} - {x: 0.1485744, y: 0, z: -1.605563} - - {x: 0.3737533, y: 0, z: -1.7904853} - - {x: 0.7053852, y: 0, z: -2.1046336} - - {x: 0.9957676, y: 0, z: -2.080554} - - {x: 1.304811, y: 0, z: -2.0549269} - - {x: 1.6559247, y: 0, z: -1.7070688} + - {x: 0.39021027, y: 0, z: -1.7968094} + - {x: 0.75614315, y: 0, z: -2.112126} + - {x: 1.0620927, y: 0, z: -2.0752754} + - {x: 1.3537955, y: 0, z: -2.0401406} + - {x: 1.6690999, y: 0, z: -1.6955551} - {x: 1.801823, y: 0, z: -1.43343} - - {x: 1.9997847, y: 0, z: -1.0621438} - - {x: 1.9372003, y: 0, z: -0.45645386} - - {x: 1.921371, y: 0, z: -0.03598781} - - {x: 1.9013696, y: 0, z: 0.4953025} - - {x: 1.9900074, y: 0, z: 1.315002} + - {x: 1.9959352, y: 0, z: -1.0500628} + - {x: 1.9353468, y: 0, z: -0.4351577} + - {x: 1.91811, y: 0, z: -0.005794406} + - {x: 1.8971483, y: 0, z: 0.516354} + - {x: 1.9841644, y: 0, z: 1.3219795} - {x: 1.637977, y: 0, z: 1.713429} - - {x: 1.418918, y: 0, z: 1.9613593} + - {x: 1.4188036, y: 0, z: 1.961258} - {x: 0.8967912, y: 0, z: 2.1158187} - {x: 0.5793749, y: 0, z: 2.022528} - {x: 0.10728112, y: 0, z: 1.8837764} @@ -2525,27 +2525,27 @@ MonoBehaviour: - {x: 5.1789985, y: 0, z: -0.81989956} - {x: 5.6871414, y: 0, z: -0.698627} - {x: 6.0614367, y: 0, z: -0.60929835} - - {x: 6.6619644, y: 0, z: -0.8262131} + - {x: 6.6592765, y: 0, z: -0.82826304} - {x: 6.8939657, y: 0, z: -1.1332178} - - {x: 7.1100955, y: 0, z: -1.4192197} - - {x: 7.048808, y: 0, z: -1.9741888} - - {x: 6.976503, y: 0, z: -2.3253028} - - {x: 6.926899, y: 0, z: -2.566179} - - {x: 6.803455, y: 0, z: -2.9140534} + - {x: 7.090651, y: 0, z: -1.3887904} + - {x: 7.0414877, y: 0, z: -1.8862948} + - {x: 6.9870467, y: 0, z: -2.2041607} + - {x: 6.9397736, y: 0, z: -2.4801753} + - {x: 6.82747, y: 0, z: -2.8889887} - {x: 6.601364, y: 0, z: -3.054201} - - {x: 6.167628, y: 0, z: -3.3549922} + - {x: 6.1751833, y: 0, z: -3.3656054} - {x: 5.3808746, y: 0, z: -3.2281113} - {x: 4.854007, y: 0, z: -3.259934} - {x: 4.1694064, y: 0, z: -3.3012836} - - {x: 3.2537, y: 0, z: -3.2711592} + - {x: 3.2537053, y: 0, z: -3.2697687} - {x: 2.56786, y: 0, z: -3.267828} - - {x: 1.9046131, y: 0, z: -3.2646065} - - {x: 1.0190134, y: 0, z: -3.2824657} - - {x: 0.3572032, y: 0, z: -3.238718} - - {x: -0.2348054, y: 0, z: -3.1995845} - - {x: -1.14167, y: 0, z: -3.3729115} + - {x: 1.9230945, y: 0, z: -3.2660034} + - {x: 1.0621492, y: 0, z: -3.2898088} + - {x: 0.41872236, y: 0, z: -3.2482436} + - {x: -0.19197002, y: 0, z: -3.2087932} + - {x: -1.1272482, y: 0, z: -3.3847642} - {x: -1.606515, y: 0, z: -3.004232} - - {x: -1.8873883, y: 0, z: -2.7814646} + - {x: -1.8872702, y: 0, z: -2.7813156} - {x: -2.021733, y: 0, z: -2.2395504} isClosed: 1 space: 2 @@ -3025,7 +3025,7 @@ Mesh: m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: pb_Mesh-1380 + m_Name: pb_Mesh-12658 serializedVersion: 10 m_SubMeshes: - serializedVersion: 2 @@ -3713,6 +3713,10 @@ PrefabInstance: propertyPath: doDrawTurns value: 0 objectReference: {fileID: 0} + - target: {fileID: 232442690398667687, guid: e982963cf198f1e45bb8ad4577c0d86a, type: 3} + propertyPath: numObstacles + value: 3 + objectReference: {fileID: 0} - target: {fileID: 232442690398667687, guid: e982963cf198f1e45bb8ad4577c0d86a, type: 3} propertyPath: TrajectorySpline value: diff --git a/autocopylot/Assets/Scripts/Car.cs b/autocopylot/Assets/Scripts/Car.cs index b465fc5..c8ebabb 100644 --- a/autocopylot/Assets/Scripts/Car.cs +++ b/autocopylot/Assets/Scripts/Car.cs @@ -50,8 +50,17 @@ void Update() counter += timesteps; if (counter > RandomizeEvery) { + Vector3 pos = transform.position; Randomize(); + + // get time from position + t = carPath.CarSpline.path.GetClosestTimeOnPath(pos); + carPath.t = t; + carPath.prevDist = carPath.CarSpline.path.GetClosestDistanceAlongPath(pos); + + t += timesteps; carPath.UpdateTransform(t); + counter = 0.0f; } else diff --git a/autocopylot/Assets/Scripts/CarPath.cs b/autocopylot/Assets/Scripts/CarPath.cs index 6be1690..5128231 100644 --- a/autocopylot/Assets/Scripts/CarPath.cs +++ b/autocopylot/Assets/Scripts/CarPath.cs @@ -50,37 +50,69 @@ public class CarPath : MonoBehaviour public float turnTh = 20f; public bool doDrawTurns = true; - private float t = 0.0f; + public float t = 0.0f; private float dt = 0.0f; - private float prevDist = 0.0f; + public float prevDist = 0.0f; private int laneRes = 10; private float laneDist = 2.0f; private (float, Vector3)[] zones; private float[] averagedAngles; + public int numObstacles = 1; + private (int, Vector3)[] previous_offsets; + public void Start() { if (RoadSpline == null || TrajectorySpline == null || CarSpline == null) throw new ArgumentNullException("RoadSpline, TrajectorySpline or CarSpline is null"); + + if (previous_offsets == null) + previous_offsets = new (int, Vector3)[numObstacles]; + CreateObstacles(); CreateCarSpline(); CreateZone(); } + public void CreateObstacles() + { + + foreach ((int index, Vector3 prevoffset) in previous_offsets) + { + TrajectorySpline.bezierPath.SetPoint(index, TrajectorySpline.bezierPath.GetPoint(index) - prevoffset); + } + + for (int i = 0; i < numObstacles; i++) + { + // Offset a random point to insert an obstacle on the road + int randomPoint = UnityEngine.Random.Range(0, TrajectorySpline.bezierPath.NumSegments) * 3; + float offset = UnityEngine.Random.Range(0.3f, 0.5f); + bool sign = UnityEngine.Random.Range(0, 2) == 0 ? true : false; + if (sign) + offset = -offset; + + Vector3 point = TrajectorySpline.bezierPath.GetPoint(randomPoint); + Vector3 normal = TrajectorySpline.path.GetNormalAtDistance(TrajectorySpline.path.GetClosestDistanceAlongPath(point)); + Vector3 offsetPoint = offset * normal; + previous_offsets[i] = (randomPoint, offsetPoint); + TrajectorySpline.bezierPath.MovePoint(randomPoint, point + offsetPoint); + } + } public void CreateCarSpline() { int step = 6; - int numPoints = RoadSpline.path.NumPoints / step; + int numPoints = TrajectorySpline.path.NumPoints / step; Vector3[] points = new Vector3[numPoints]; for (int i = 0; i < points.Length; i++) { - points[i] = RoadSpline.path.GetPoint(i * step) - RoadSpline.transform.position + RoadSpline.path.GetNormal(i) * UnityEngine.Random.Range(-RandomDist, RandomDist); + points[i] = TrajectorySpline.path.GetPoint(i * step) - TrajectorySpline.transform.position + TrajectorySpline.path.GetNormal(i) * UnityEngine.Random.Range(-RandomDist, RandomDist); points[i] += Vector3.up * UnityEngine.Random.Range(minSpeed, maxSpeed); } BezierPath bezierPath = new BezierPath(points, true, PathSpace.xyz); CarSpline.bezierPath = bezierPath; + // TODO do the same with } public void CreateZone() @@ -159,7 +191,7 @@ public void UpdateTransform(float t) transform.rotation = Quaternion.LookRotation(diff); speed = (v1.y + v2.y) / 2.0f; - prevDist = dist; ; + prevDist = dist; this.t = t; } @@ -275,13 +307,12 @@ public void OnDrawGizmos() if (averagedAngles[i] > turnTh) Gizmos.DrawSphere(RoadSpline.path.GetPointAtDistance(i * pointsEvery), averagedAngles[i] / 180.0f); } - } - Vector3[] trajectory = GetTrajectory(); - foreach (Vector3 trajectoryPoint in trajectory) - { - Gizmos.DrawSphere(trajectoryPoint + pos, 0.1f); - // Debug.Log(trajectoryPoint); + Vector3[] trajectory = GetTrajectory(); + foreach (Vector3 trajectoryPoint in trajectory) + { + Gizmos.DrawSphere(trajectoryPoint + pos, 0.1f); + } } } } diff --git a/autocopylot/Assets/Scripts/GenerateEnv.cs.meta b/autocopylot/Assets/Scripts/GenerateEnv.cs.meta index b6b4f77..18901cc 100644 --- a/autocopylot/Assets/Scripts/GenerateEnv.cs.meta +++ b/autocopylot/Assets/Scripts/GenerateEnv.cs.meta @@ -4,7 +4,7 @@ MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] - executionOrder: 0 + executionOrder: 100 icon: {instanceID: 0} userData: assetBundleName: diff --git a/autocopylot/Assets/Scripts/GenerateRoad.cs b/autocopylot/Assets/Scripts/GenerateRoad.cs index df730a9..0874c00 100644 --- a/autocopylot/Assets/Scripts/GenerateRoad.cs +++ b/autocopylot/Assets/Scripts/GenerateRoad.cs @@ -134,7 +134,7 @@ public void GenerateSplines() private void PathUpdated() { - if (DoBuildRoad && RoadSpline != null) + if (DoBuildRoad) { AssignMeshComponents(); AssignMaterials(); diff --git a/autocopylot/Assets/Scripts/GenerateRoad.cs.meta b/autocopylot/Assets/Scripts/GenerateRoad.cs.meta index 7ddb8e9..4e048ea 100644 --- a/autocopylot/Assets/Scripts/GenerateRoad.cs.meta +++ b/autocopylot/Assets/Scripts/GenerateRoad.cs.meta @@ -4,7 +4,7 @@ MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: [] - executionOrder: 0 + executionOrder: -50 icon: {instanceID: 0} userData: assetBundleName: diff --git a/autocopylot/ProjectSettings/QualitySettings.asset b/autocopylot/ProjectSettings/QualitySettings.asset index 7b7658d..64f2781 100644 --- a/autocopylot/ProjectSettings/QualitySettings.asset +++ b/autocopylot/ProjectSettings/QualitySettings.asset @@ -18,7 +18,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 1 + skinWeights: 1 textureQuality: 1 anisotropicTextures: 0 antiAliasing: 0 @@ -40,6 +40,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Low @@ -53,7 +54,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 0 antiAliasing: 0 @@ -75,6 +76,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Medium @@ -88,7 +90,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 0 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -110,6 +112,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: High @@ -123,7 +126,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 2 + skinWeights: 2 textureQuality: 0 anisotropicTextures: 1 antiAliasing: 0 @@ -145,6 +148,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Very High @@ -158,7 +162,7 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 antiAliasing: 2 @@ -180,12 +184,13 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] - serializedVersion: 2 name: Ultra pixelLightCount: 4 shadows: 2 - shadowResolution: 2 + shadowResolution: 3 shadowProjection: 1 shadowCascades: 4 shadowDistance: 150 @@ -193,11 +198,11 @@ QualitySettings: shadowCascade2Split: 0.33333334 shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} shadowmaskMode: 1 - blendWeights: 4 + skinWeights: 4 textureQuality: 0 anisotropicTextures: 2 - antiAliasing: 2 - softParticles: 1 + antiAliasing: 4 + softParticles: 0 softVegetation: 1 realtimeReflectionProbes: 1 billboardsFaceCameraPosition: 1 @@ -215,6 +220,7 @@ QualitySettings: asyncUploadBufferSize: 16 asyncUploadPersistentBuffer: 1 resolutionScalingFixedDPIFactor: 1 + customRenderPipeline: {fileID: 0} excludedTargetPlatforms: [] m_PerPlatformDefaultQuality: Android: 2 diff --git a/autocopylot/ProjectSettings/TimelineSettings.asset b/autocopylot/ProjectSettings/TimelineSettings.asset new file mode 100644 index 0000000..b4fbdb0 --- /dev/null +++ b/autocopylot/ProjectSettings/TimelineSettings.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &1 +MonoBehaviour: + m_ObjectHideFlags: 61 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3} + m_Name: + m_EditorClassIdentifier: + assetDefaultFramerate: 60