From 36a0a97ba86fa262df384a25e1f10da5f73df6a8 Mon Sep 17 00:00:00 2001 From: bozmir <49904467+bozmir@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:07:46 +0100 Subject: [PATCH 1/2] zone triggers and new route --- Assets/Scenes/Main.unity | 9 +- .../KerstSpecial/20120210 Elfstedentocht.txt | 5467 +---------------- Assets/Scripts/KerstSpecial/NL3D2024.txt | 98 + Assets/Scripts/KerstSpecial/NL3D2024.txt.meta | 7 + Assets/Scripts/KerstSpecial/RaceController.cs | 120 +- Assets/Scripts/KerstSpecial/ZoneTrigger.cs | 23 + .../Scripts/KerstSpecial/ZoneTrigger.cs.meta | 11 + 7 files changed, 333 insertions(+), 5402 deletions(-) create mode 100644 Assets/Scripts/KerstSpecial/NL3D2024.txt create mode 100644 Assets/Scripts/KerstSpecial/NL3D2024.txt.meta create mode 100644 Assets/Scripts/KerstSpecial/ZoneTrigger.cs create mode 100644 Assets/Scripts/KerstSpecial/ZoneTrigger.cs.meta diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity index 728880cb..85e6a795 100644 --- a/Assets/Scenes/Main.unity +++ b/Assets/Scenes/Main.unity @@ -1039,6 +1039,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f4422e4ad9a4faf409cd394f7efaec2a, type: 3} m_Name: m_EditorClassIdentifier: + rotationSpeed: 60 playerSpeed: 30 jumpForce: 10 horizontalInput: {fileID: 11400000, guid: 93242d5c5434ab44c966480e1ff5c8d5, type: 2} @@ -2535,22 +2536,22 @@ PrefabInstance: - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.w - value: 0.19884856 + value: 0.1976436 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.x - value: 0.08303692 + value: 0.08246903 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.y - value: 0.901095 + value: 0.90147 objectReference: {fileID: 0} - target: {fileID: 3849934062868920522, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} propertyPath: m_LocalRotation.z - value: -0.37628713 + value: -0.3761486 objectReference: {fileID: 0} - target: {fileID: 3919916255551741050, guid: 5fbb7c7c8ec47e849afba1b658f3e07e, type: 3} diff --git a/Assets/Scripts/KerstSpecial/20120210 Elfstedentocht.txt b/Assets/Scripts/KerstSpecial/20120210 Elfstedentocht.txt index fe441f88..1fda4188 100644 --- a/Assets/Scripts/KerstSpecial/20120210 Elfstedentocht.txt +++ b/Assets/Scripts/KerstSpecial/20120210 Elfstedentocht.txt @@ -1,5378 +1,95 @@ - + ACTIVE LOG072542 - - - -2.887000 - - - - -3.222000 - - - - -3.063000 - - - - -3.290000 - - - - -3.524000 - - - - -3.843000 - - - - -4.252000 - - - - -3.294000 - - - - -3.141000 - - - - -4.199000 - - - - -4.324000 - - - - -4.055000 - - - - -4.664000 - - - - -4.669000 - - - - -5.356000 - - - - -6.260000 - - - - -6.473000 - - - - -6.406000 - - - - -6.544000 - - - - -6.424000 - - - - -6.044000 - - - - -5.779000 - - - - -5.757000 - - - - -5.661000 - - - - -5.585000 - - - - -5.741000 - - - - -6.447000 - - - - -6.885000 - - - - -6.832000 - - - - -7.160000 - - - - -7.522000 - - - - -7.782000 - - - - -7.524000 - - - - -7.925000 - - - - -7.441000 - - - - -7.299000 - - - - -7.931000 - - - - -6.896000 - - - - -7.479000 - - - - -7.419000 - - - - -6.269000 - - - - -7.480000 - - - - -6.588000 - - - - -7.167000 - - - - -6.686000 - - - - -6.866000 - - - - -6.992000 - - - - -6.464000 - - - - -6.453000 - - - - -6.020000 - - - - -6.019000 - - - - -6.095000 - - - - -0.276000 - - - - -6.943000 - - - - -6.454000 - - - - -6.312000 - - - - -5.737000 - - - - -6.720000 - - - - -6.075000 - - - - -4.505000 - - - - -5.224000 - - - - -4.614000 - - - - -4.265000 - - - - -4.298000 - - - - -5.117000 - - - - -5.843000 - - - - -5.987000 - - - - -6.123000 - - - - -7.761000 - - - - -7.092000 - - - - -8.971000 - - - - -9.748000 - - - - -7.933000 - - - - -9.982000 - - - - -9.314000 - - - - -11.558000 - - - - -10.772000 - - - - -10.574000 - - - - -11.566000 - - - - -11.033000 - - - - -10.464000 - - - - -11.720000 - - - - -11.355000 - - - - -10.813000 - - - - -9.531000 - - - - -10.129000 - - - - -11.740000 - - - - -10.973000 - - - - -11.088000 - - - - -10.611000 - - - - -10.955000 - - - - -11.212000 - - - - -13.035000 - - - - -12.840000 - - - - -11.917000 - - - - -10.871000 - - - - -11.328000 - - - - -10.524000 - - - - -11.060000 - - - - -10.766000 - - - - -10.752000 - - - - -11.414000 - - - - -10.764000 - - - - -10.402000 - - - - -10.682000 - - - - -9.543000 - - - - -9.526000 - - - - -8.739000 - - - - -11.964000 - - - - -8.247000 - - - - -8.099000 - - - - -7.802000 - - - - -6.681000 - - - - -7.786000 - - - - -5.950000 - - - - -6.787000 - - - - -6.078000 - - - - -7.348000 - - - - -9.486000 - - - - -9.974000 - - - - -10.036000 - - - - -10.286000 - - - - -10.062000 - - - - -11.272000 - - - - -9.296000 - - - - -8.091000 - - - - -10.849000 - - - - -10.824000 - - - - -10.991000 - - - - -10.599000 - - - - -9.938000 - - - - -9.928000 - - - - -8.882000 - - - - -8.684000 - - - - -9.158000 - - - - -8.834000 - - - - -9.174000 - - - - -7.918000 - - - - -8.171000 - - - - -7.721000 - - - - -7.598000 - - - - -7.728000 - - - - -7.383000 - - - - -6.670000 - - - - -7.285000 - - - - -7.892000 - - - - -7.336000 - - - - -7.186000 - - - - -7.605000 - - - - -7.202000 - - - - -7.907000 - - - - -7.632000 - - - - -7.578000 - - - - -7.100000 - - - - -6.368000 - - - - -6.824000 - - - - -7.316000 - - - - -6.405000 - - - - -9.009000 - - - - -10.254000 - - - - -6.412000 - - - - -6.921000 - - - - -8.105000 - - - - -7.172000 - - - - -5.965000 - - - - -5.100000 - - - - -3.589000 - - - - -4.719000 - - - - -4.868000 - - - - -3.812000 - - - - -4.805000 - - - - -7.777000 - - - - -3.805000 - - - - -4.192000 - - - - -6.682000 - - - - -6.739000 - - - - -6.444000 - - - - -6.288000 - - - - -3.988000 - - - - -4.121000 - - - - -6.318000 - - - - -4.831000 - - - - -4.972000 - - - - -9.301000 - - - - -7.178000 - - - - -6.806000 - - - - -9.637000 - - - - -9.938000 - - - - -9.827000 - - - - -4.911000 - - - - -9.843000 - - - - -7.857000 - - - - -7.282000 - - - - -8.409000 - - - - -8.436000 - - - - -9.805000 - - - - -8.555000 - - - - -8.608000 - - - - -7.495000 - - - - -7.099000 - - - - -6.332000 - - - - -7.259000 - - - - -3.062000 - - - - -4.369000 - - - - -7.178000 - - - - -4.717000 - - - - -6.373000 - - - - -5.222000 - - - - -5.335000 - - - - -2.945000 - - - - -3.606000 - - - - -3.736000 - - - - -2.499000 - - - - -3.320000 - - - - -3.164000 - - - - 0.227000 - - - - 2.009000 - - - - -0.961000 - - - - -2.889000 - - - - -2.676000 - - - - -3.964000 - - - - -0.716000 - - - - -1.859000 - - - - -2.734000 - - - - -4.423000 - - - - -6.473000 - - - - -8.139000 - - - - -6.499000 - - - - -6.574000 - - - - -7.043000 - - - - -6.934000 - - - - -8.643000 - - - - -8.094000 - - - - -9.227000 - - - - -9.175000 - - - - -4.058000 - - - - -6.856000 - - - - -10.855000 - - - - -10.574000 - - - - -10.412000 - - - - -8.810000 - - - - -7.694000 - - - - -7.074000 - - - - -7.904000 - - - - -12.041000 - - - - -10.995000 - - - - -10.618000 - - - - -9.804000 - - - - -11.661000 - - - - -10.214000 - - - - -10.681000 - - - - -10.731000 - - - - -10.702000 - - - - -11.070000 - - - - -11.061000 - - - - -8.950000 - - - - -10.140000 - - - - -10.154000 - - - - -9.994000 - - - - -9.647000 - - - - -11.228000 - - - - -10.635000 - - - - -10.297000 - - - - -9.301000 - - - - -10.952000 - - - - -12.339000 - - - - -10.133000 - - - - -11.181000 - - - - -11.562000 - - - - -12.347000 - - - - -11.473000 - - - - -11.641000 - - - - -11.561000 - - - - -10.566000 - - - - -12.829000 - - - - -11.487000 - - - - -10.159000 - - - - -10.351000 - - - - -11.301000 - - - - -10.657000 - - - - -11.457000 - - - - -11.648000 - - - - -11.784000 - - - - -11.177000 - - - - -12.320000 - - - - -11.345000 - - - - -11.145000 - - - - -12.475000 - - - - -10.346000 - - - - -10.635000 - - - - -9.911000 - - - - -10.168000 - - - - -11.377000 - - - - -11.501000 - - - - -11.151000 - - - - -7.287000 - - - - -11.079000 - - - - -9.476000 - - - - -10.089000 - - - - -12.397000 - - - - -9.233000 - - - - -10.774000 - - - - -10.826000 - - - - -11.933000 - - - - -9.303000 - - - - -12.982000 - - - - -11.246000 - - - - -12.360000 - - - - -12.092000 - - - - -12.262000 - - - - -12.507000 - - - - -13.396000 - - - - -14.037000 - - - - -14.355000 - - - - -16.337000 - - - - -14.326000 - - - - -15.003000 - - - - -13.671000 - - - - -10.183000 - - - - -13.511000 - - - - -16.095000 - - - - -15.857000 - - - - -15.965000 - - - - -14.706000 - - - - -15.180000 - - - - -15.313000 - - - - -15.436000 - - - - -15.548000 - - - - -15.545000 - - - - -16.193000 - - - - -15.355000 - - - - -15.016000 - - - - -14.307000 - - - - -15.323000 - - - - -16.086000 - - - - -14.725000 - - - - -14.833000 - - - - -15.547000 - - - - -14.307000 - - - - -13.118000 - - - - -16.168000 - - - - -14.023000 - - - - -13.567000 - - - - -13.880000 - - - - -15.964000 - - - - -13.241000 - - - - -9.777000 - - - - -7.139000 - - - - -7.209000 - - - - -9.115000 - - - - -11.903000 - - - - -10.465000 - - - - -10.270000 - - - - -12.234000 - - - - -11.167000 - - - - -12.468000 - - - - -9.880000 - - - - -9.803000 - - - - -11.880000 - - - - -11.049000 - - - - -13.510000 - - - - -13.401000 - - - - -12.314000 - - - - -11.188000 - - - - -11.629000 - - - - -12.178000 - - - - -11.365000 - - - - -10.548000 - - - - -10.863000 - - - - -13.947000 - - - - -9.812000 - - - - -9.671000 - - - - -10.038000 - - - - -8.875000 - - - - -7.195000 - - - - -9.548000 - - - - -10.318000 - - - - -8.214000 - - - - -9.835000 - - - - -10.674000 - - - - -11.195000 - - - - -12.245000 - - - - -9.987000 - - - - -9.757000 - - - - -11.048000 - - - - -8.723000 - - - - -10.867000 - - - - -11.629000 - - - - -11.536000 - - - - -10.919000 - - - - -10.371000 - - - - -10.640000 - - - - -10.459000 - - - - -9.257000 - - - - -10.474000 - - - - -10.256000 - - - - -8.710000 - - - - -10.723000 - - - - -10.074000 - - - - -11.002000 - - - - - ACTIVE LOG154308 - - - -12.458000 - - - - 8.670000 - - - - -10.915000 - - - - -10.744000 - - - - -9.630000 - - - - -9.538000 - - - - -9.954000 - - - - -10.281000 - - - - -9.456000 - - - - -10.359000 - - - - -10.034000 - - - - -9.715000 - - - - -9.871000 - - - - -9.478000 - - - - -10.228000 - - - - -10.386000 - - - - -10.975000 - - - - -11.630000 - - - - -10.945000 - - - - -11.276000 - - - - -9.784000 - - - - -9.012000 - - - - -10.746000 - - - - -8.408000 - - - - -7.831000 - - - - -8.449000 - - - - -9.339000 - - - - -9.108000 - - - - -8.565000 - - - - -8.524000 - - - - -8.753000 - - - - -8.431000 - - - - -7.683000 - - - - -8.366000 - - - - -8.113000 - - - - -8.997000 - - - - -8.354000 - - - - -8.492000 - - - - -8.075000 - - - - -8.505000 - - - - -9.455000 - - - - -7.809000 - - - - -9.155000 - - - - -8.201000 - - - - -8.030000 - - - - -7.143000 - - - - -7.590000 - - - - -6.820000 - - - - -7.082000 - - - - -7.344000 - - - - -7.604000 - - - - -8.182000 - - - - -8.098000 - - - - -6.536000 - - - - -7.453000 - - - - -6.591000 - - - - -6.988000 - - - - -6.081000 - - - - -6.728000 - - - - -8.220000 - - - - -6.714000 - - - - -7.873000 - - - - -7.380000 - - - - -7.265000 - - - - -7.005000 - - - - -6.951000 - - - - -7.929000 - - - - -8.251000 - - - - -7.399000 - - - - -7.271000 - - - - -7.844000 - - - - -7.669000 - - - - -7.367000 - - - - -8.672000 - - - - -6.968000 - - - - -7.330000 - - - - -7.466000 - - - - -7.242000 - - - - -7.415000 - - - - -7.669000 - - - - -7.385000 - - - - -7.832000 - - - - -5.931000 - - - - -8.276000 - - - - -8.062000 - - - - -8.526000 - - - - -8.432000 - - - - -7.525000 - - - - -8.128000 - - - - -7.987000 - - - - -8.831000 - - - - -7.645000 - - - - -6.964000 - - - - -4.717000 - - - - -6.993000 - - - - -8.121000 - - - - -8.812000 - - - - -8.828000 - - - - -7.891000 - - - - -8.953000 - - - - -9.144000 - - - - -10.221000 - - - - -9.846000 - - - - -9.904000 - - - - -12.265000 - - - - -10.105000 - - - - -10.404000 - - - - -11.420000 - - - - -10.626000 - - - - -10.615000 - - - - -10.999000 - - - - -10.938000 - - - - -11.955000 - - - - -12.620000 - - - - -12.647000 - - - - -13.114000 - - - - -13.360000 - - - - -11.331000 - - - - -11.194000 - - - - -10.316000 - - - - -10.153000 - - - - -9.807000 - - - - -9.494000 - - - - -9.638000 - - - - -10.299000 - - - - -11.139000 - - - - -11.466000 - - - - -11.957000 - - - - -12.044000 - - - - -12.557000 - - - - -11.219000 - - - - -10.748000 - - - - -11.738000 - - - - -12.116000 - - - - -10.817000 - - - - -11.851000 - - - - -11.580000 - - - - -12.076000 - - - - -12.520000 - - - - -13.196000 - - - - -12.414000 - - - - -12.517000 - - - - -11.941000 - - - - -13.258000 - - - - -13.675000 - - - - -13.338000 - - - - -13.715000 - - - - -14.299000 - - - - -13.573000 - - - - -13.615000 - - - - -12.226000 - - - - -12.757000 - - - - -11.726000 - - - - -12.071000 - - - - -13.241000 - - - - -13.098000 - - - - -13.561000 - - - - -13.267000 - - - - -12.906000 - - - - -12.920000 - - - - -12.935000 - - - - -12.764000 - - - - -12.347000 - - - - -15.254000 - - - - -12.123000 - - - - -11.275000 - - - - -12.140000 - - - - -13.102000 - - - - -13.331000 - - - - -12.837000 - - - - -13.077000 - - - - -12.536000 - - - - -12.423000 - - - - -13.082000 - - - - -12.141000 - - - - -12.484000 - - - - -12.963000 - - - - -13.132000 - - - - -13.127000 - - - - -12.979000 - - - - -12.026000 - - - - -13.071000 - - - - -12.805000 - - - - -13.231000 - - - - -13.012000 - - - - -12.666000 - - - - -13.314000 - - - - -13.912000 - - - - -13.431000 - - - - -13.238000 - - - - -13.593000 - - - - -13.523000 - - - - -13.267000 - - - - -12.791000 - - - - -13.328000 - - - - -13.572000 - - - - -13.175000 - - - - -14.032000 - - - - -14.987000 - - - - -11.547000 - - - - -13.235000 - - - - -13.690000 - - - - -13.252000 - - - - -13.832000 - - - - -12.817000 - - - - -13.041000 - - - - -12.779000 - - - - -12.659000 - - - - -12.405000 - - - - -12.114000 - - - - -12.342000 - - - - -12.962000 - - - - -12.657000 - - - - -12.715000 - - - - -12.041000 - - - - -12.876000 - - - - -12.742000 - - - - -14.373000 - - - - -12.702000 - - - - -12.080000 - - - - -12.086000 - - - - -11.968000 - - - - -11.810000 - - - - -12.353000 - - - - -13.172000 - - - - -12.058000 - - - - -16.101000 - - - - -12.192000 - - - - -12.684000 - - - - -12.378000 - - - - -13.012000 - - - - -12.701000 - - - - -10.832000 - - - - -12.397000 - - - - -12.748000 - - - - -12.961000 - - - - -12.928000 - - - - -12.051000 - - - - -13.465000 - - - - -12.719000 - - - - -11.736000 - - - - -12.609000 - - - - -12.248000 - - - - -12.619000 - - - - -12.859000 - - - - -12.190000 - - - - -12.911000 - - - - -13.100000 - - - - -13.310000 - - - - -12.960000 - - - - -12.246000 - - - - -12.240000 - - - - -13.038000 - - - - -12.514000 - - - - -12.347000 - - - - -12.199000 - - - - -12.964000 - - - - -13.078000 - - - - -12.827000 - - - - -12.247000 - - - - -12.791000 - - - - -12.347000 - - - - -12.147000 - - - - -13.438000 - - - - -12.878000 - - - - -12.014000 - - - - -12.020000 - - - - -11.950000 - - - - -11.707000 - - - - -11.601000 - - - - -12.669000 - - - - -11.789000 - - - - -12.269000 - - - - -11.789000 - - - - -11.916000 - - - - -13.658000 - - - - -13.707000 - - - - -13.538000 - - - - -13.309000 - - - - -18.743000 - - - - -10.617000 - - - - -13.168000 - - - - -12.727000 - - - - -13.104000 - - - - -12.341000 - - - - -12.619000 - - - - -12.509000 - - - - -11.970000 - - - - -11.752000 - - - - -11.612000 - - - - -11.871000 - - - - -11.851000 - - - - -12.015000 - - - - -11.360000 - - - - -11.166000 - - - - -10.880000 - - - - -11.213000 - - - - -10.572000 - - - - -10.346000 - - - - -10.056000 - - - - -9.785000 - - - - -10.356000 - - - - -11.008000 - - - - -10.624000 - - - - -10.651000 - - - - -10.277000 - - - - -10.130000 - - - - -10.292000 - - - - -11.029000 - - - - -11.188000 - - - - -10.793000 - - - - -10.014000 - - - - -10.422000 - - - - -10.669000 - - - - -10.596000 - - - - -9.683000 - - - - -9.983000 - - - - -9.584000 - - - - -9.647000 - - - - -9.125000 - - - - -9.426000 - - - - -8.796000 - - - - -8.471000 - - - - -7.991000 - - - - -8.610000 - - - - -8.589000 - - - - -7.818000 - - - - -7.383000 - - - - -7.439000 - - - - -7.870000 - - - - -7.523000 - - - - -7.916000 - - - - -8.037000 - - - - -8.253000 - - - - -8.747000 - - - - -7.948000 - - - - -7.988000 - - - - -8.267000 - - - - -8.664000 - - - - -7.922000 - - - - -7.968000 - - - - -8.933000 - - - - -6.933000 - - - - -7.928000 - - - - -7.842000 - - - - -8.353000 - - - - -8.182000 - - - - -8.020000 - - - - -8.414000 - - - - -8.020000 - - - - -8.409000 - - - - -8.069000 - - - - -7.696000 - - - - -7.436000 - - - - -6.496000 - - - - -8.470000 - - - - -7.362000 - - - - -6.794000 - - - - -6.589000 - - - - -6.320000 - - - - -7.216000 - - - - -6.378000 - - - - -7.175000 - - - - -8.227000 - - - - -7.144000 - - - - -7.057000 - - - - -6.159000 - - - - -6.295000 - - - - -7.022000 - - - - -5.612000 - - - - -7.697000 - - - - -7.248000 - - - - -7.024000 - - - - -7.212000 - - - - -6.072000 - - - - -6.053000 - - - - -5.983000 - - - - -5.952000 - - - - -6.138000 - - - - -6.249000 - - - - -6.448000 - - - - -6.877000 - - - - -6.876000 - - - - -6.502000 - - - - -7.840000 - - - - -6.676000 - - - - -6.908000 - - - - -7.558000 - - - - -6.993000 - - - - -8.263000 - - - - -6.855000 - - - - -5.908000 - - - - -11.790000 - - - - -8.056000 - - - - -6.811000 - - - - -7.799000 - - - - -8.864000 - - - - -8.936000 - - - - -8.724000 - - - - -9.124000 - - - - - ACTIVE LOG185441 - - - -9.124000 - - - - -9.071000 - - - - -8.767000 - - - - -9.595000 - - - - -7.896000 - - - - -8.063000 - - - - -8.273000 - - - - -8.294000 - - - - -7.551000 - - - - -8.195000 - - - - -7.758000 - - - - -6.373000 - - - - -7.383000 - - - - -7.128000 - - - - -7.341000 - - - - -8.194000 - - - - -7.722000 - - - - -8.069000 - - - - -7.073000 - - - - -7.593000 - - - - -7.930000 - - - - -7.563000 - - - - -7.491000 - - - - -7.477000 - - - - -7.413000 - - - - -8.283000 - - - - -7.730000 - - - - -7.945000 - - - - -8.128000 - - - - -7.174000 - - - - -7.968000 - - - - -8.341000 - - - - -7.787000 - - - - -8.342000 - - - - -7.946000 - - - - -12.740000 - - - - -8.317000 - - - - -8.690000 - - - - -8.795000 - - - - -9.354000 - - - - -6.914000 - - - - -6.178000 - - - - -6.643000 - - - - -6.786000 - - - - -6.918000 - - - - - ACTIVE LOG191040 - - - -6.770000 - - - - - ACTIVE LOG191144 - - - -6.553000 - - - - -6.546000 - - - - -6.058000 - - - - - ACTIVE LOG191331 - - - -6.666000 - - - - -5.879000 - - - - -5.799000 - - - - -6.328000 - - - - - ACTIVE LOG191721 - - - -5.773000 - - - - - ACTIVE LOG191747 - - - -5.419000 - - - - - ACTIVE LOG191910 - - - -5.466000 - - - - - ACTIVE LOG191939 - - - -5.361000 - - - - - ACTIVE LOG192018 - - - -5.329000 - - - - - ACTIVE LOG192116 - - - -5.091000 - - - - -4.721000 - - - - -5.215000 - - - - -5.232000 - - - - -5.011000 - - - - -5.080000 - - - - -4.442000 - - - - -8.558000 - - - - -1.408000 - - - - -4.611000 - - - - - ACTIVE LOG192515 - - - -5.213000 - - - - - ACTIVE LOG192847 - - - -4.056000 - - - - -4.162000 - - - - -4.865000 - - - - -3.993000 - - - - -4.795000 - - - - -4.679000 - - - - -4.787000 - - - - -4.772000 - - - - -4.805000 - - - - -4.933000 - - - - -5.028000 - - - - -5.165000 - - - - -5.243000 - - - - -5.022000 - - - - -4.991000 - - - - -4.987000 - - - - -5.181000 - - - - -4.980000 - - - - -4.911000 - - - - -4.869000 - - - - -4.825000 - - - - -4.757000 - - - - -4.851000 - - - - -4.470000 - - - - -4.400000 - - - - -4.564000 - - - - -4.538000 - - - - -4.369000 - - - - -4.499000 - - - - -3.867000 - - - - -3.579000 - - - - -3.127000 - - - - -2.873000 - - - - -3.027000 - - - - -2.617000 - - - - -2.295000 - - - - -1.330000 - - - - -1.151000 - - - - -1.019000 - - - - -0.798000 - - - - -0.701000 - - - - -0.891000 - - - - -1.515000 - - - - -1.504000 - - - - -1.425000 - - - - -0.747000 - - - - -1.574000 - - - - -0.564000 - - - - -6.055000 - - - - -2.019000 - - - - 0.322000 - - - - -0.571000 - - - - -0.761000 - - - - -1.835000 - - - - 0.216000 - - - - - ACTIVE LOG194539 - - - -0.170000 - - - - -3.838000 - - - - -0.773000 - - - - -2.147000 - - - - - ACTIVE LOG194734 - - - -0.249000 - - - - -0.032000 - - - - 0.600000 - - - - -4.598000 - - - - -2.827000 - - - - -2.705000 - - - - -2.724000 - - - - -2.486000 - - - - -3.320000 - - - - -2.516000 - - - - -2.934000 - - - - 0.084000 - - - - -1.524000 - - - - -2.973000 - - - - -3.662000 - - - - -2.902000 - - - - -3.224000 - - - - -3.940000 - - - - -2.512000 - - - - -2.625000 - - - - -3.336000 - - - - -2.798000 - - - - -2.624000 - - - - -2.518000 - - - - -1.991000 - - - - -2.051000 - - - - -2.652000 - - - - -2.363000 - - - - -2.134000 - - - - -2.426000 - - - - -2.353000 - - - - -1.936000 - - - - -2.587000 - - - - -2.265000 - - - - -2.666000 - - - - -2.662000 - - - - -2.972000 - - - - -3.114000 - - - - -3.252000 - - - - -3.147000 - - - - -3.249000 - - - - -3.367000 - - - - -3.661000 - - - - -3.344000 - - - - -3.656000 - - - - -3.274000 - - - - -3.008000 - - - - -3.156000 - - - - -3.730000 - - - - -3.656000 - - - - -3.939000 - - - - -3.885000 - - - - -3.219000 - - - - -3.280000 - - - - -3.399000 - - - - -3.269000 - - - - -2.840000 - - - - -2.966000 - - - - -2.955000 - - - - -3.213000 - - - - -3.166000 - - - - -3.500000 - - - - -3.635000 - - - - -3.154000 - - - - -3.080000 - - - - -2.595000 - - - - -2.737000 - - - - -2.485000 - - - - -2.820000 - - - - -2.608000 - - - - -2.781000 - - - - -2.298000 - - - - -2.860000 - - - - -2.738000 - - - - -3.135000 - - - - -3.172000 - - - - -3.210000 - - - - -3.227000 - - - - -3.129000 - - - - -2.530000 - - - - -2.148000 - - - - -1.977000 - - - - -2.151000 - - - - -1.842000 - - - - -2.067000 - - - - -2.139000 - - - - -2.145000 - - - - -2.680000 - - - - -5.921000 - - - - -2.367000 - - - - -3.013000 - - - - -3.197000 - - - - -2.831000 - - - - -3.083000 - - - - -2.931000 - - - - -2.848000 - - - - -3.631000 - - - - -2.910000 - - - - -2.814000 - - - - -2.876000 - - - - -2.753000 - - - - -3.082000 - - - - -2.910000 - - - - -3.735000 - - - - -3.376000 - - - - -4.003000 - - - - -3.420000 - - - - -3.627000 - - - - -3.471000 - - - - -3.489000 - - - - -3.356000 - - - - -3.158000 - - - - -3.292000 - - - - -4.077000 - - - - -3.611000 - - - - -3.921000 - - - - -3.290000 - - - - -3.839000 - - - - -3.861000 - - - - -3.700000 - - - - -3.568000 - - - - -3.647000 - - - - -4.034000 - - - - -3.767000 - - - - -4.594000 - - - - -4.087000 - - - - -3.950000 - - - - -3.717000 - - - - -3.824000 - - - - -4.494000 - - - - -4.311000 - - - - -3.721000 - - - - -4.295000 - - - - -4.064000 - - - - -4.008000 - - - - -4.437000 - - - - -4.334000 - - - - -4.165000 - - - - -4.634000 - - - - -4.395000 - - - - -4.089000 - - - - -3.970000 - - - - -4.893000 - - - - -5.288000 - - - - -4.750000 - - - - -4.704000 - - - - -4.359000 - - - - -4.526000 - - - - -4.702000 - - - - -4.782000 - - - - -5.147000 - - - - -5.426000 - - - - -5.325000 - - - - -4.981000 - - - - -4.986000 - - - - -5.271000 - - - - -5.270000 - - - - -5.025000 - - - - -5.203000 - - - - -4.982000 - - - - -5.273000 - - - - -5.653000 - - - - -6.188000 - - - - -6.237000 - - - - -6.669000 - - - - -6.587000 - - - - -5.232000 - - - - -6.483000 - - - - -7.262000 - - - - -6.348000 - - - - -8.848000 - - - - -2.956000 - - - - -15.871000 - - - - -3.855000 - - - - -6.571000 - - - - -6.368000 - - - - -6.271000 - - - - -6.543000 - - - - -6.157000 - - - - -6.514000 - - - - -6.504000 - - - - -6.232000 - - - - -5.970000 - - - - -6.014000 - - - - -5.749000 - - - - -6.300000 - - - - -6.157000 - - - - -6.092000 - - - - -6.436000 - - - - -6.182000 - - - - -5.942000 - - - - -5.652000 - - - - -5.836000 - - - - -6.001000 - - - - -6.226000 - - - - -6.167000 - - - - -6.124000 - - - - -6.365000 - - - - -6.103000 - - - - -6.380000 - - - - -6.079000 - - - - -6.571000 - - - - -6.375000 - - - - -6.336000 - - - - -5.727000 - - - - -6.725000 - - - - -6.915000 - - - - -6.815000 - - - - -6.433000 - - - - -6.972000 - - - - -6.996000 - - - - -6.851000 - - - - -7.321000 - - - - -7.202000 - - - - -6.662000 - - - - -6.112000 - - - - -6.057000 - - - - -6.943000 - - - - -7.167000 - - - - -6.750000 - - - - -6.750000 - - - - -7.038000 - - - - -6.892000 - - - - -7.486000 - - - - -7.210000 - - - - -7.725000 - - - - -7.154000 - - - - -7.180000 - - - - -7.642000 - - - - -7.543000 - - - - -7.126000 - - - - -8.115000 - - - - -8.167000 - - - - -7.961000 - - - - -7.618000 - - - - -11.677000 - - - - -9.033000 - - - - -8.561000 - - - - -9.034000 - - - - -8.950000 - - - - -9.199000 - - - - -10.210000 - - - - -9.760000 - - - - -9.967000 - - - - -10.115000 - - - - -10.042000 - - - - -9.880000 - - - - -9.696000 - - - - -9.924000 - - - - -9.786000 - - - - -9.618000 - - - - -9.160000 - - - - -9.369000 - - - - -9.359000 - - - - -9.399000 - - - - -7.994000 - - - - -8.416000 - - - - -8.487000 - - - - -8.582000 - - - - -8.728000 - - - - -8.147000 - - - - -8.304000 - - - - -7.939000 - - - - -8.047000 - - - - -8.051000 - - - - -8.001000 - - - - -8.187000 - - - - -8.352000 - - - - -8.145000 - - - - -8.508000 - - - - -8.525000 - - - - -8.145000 - - - - -7.578000 - - - - -8.375000 - - - - -8.390000 - - - - -7.703000 - - - - -8.050000 - - - - -8.512000 - - - - -8.468000 - - - - -8.664000 - - - - -11.858000 - - - - -7.441000 - - - - -7.870000 - - - - -8.145000 - - - - -7.546000 - - - - -7.874000 - - - - -8.007000 - - - - -7.586000 - - - - -8.127000 - - - - -8.550000 - - - - -8.139000 - - - - -8.284000 - - - - -8.988000 - - - - -8.461000 - - - - -8.965000 - - - - -8.187000 - - - - -9.142000 - - - - -8.945000 - - - - -9.180000 - - - - -9.270000 - - - - -9.167000 - - - - -9.257000 - - - - -9.338000 - - - - -9.776000 - - - - -9.747000 - - - - -9.792000 - - - - -9.879000 - - - - -9.871000 - - - - -10.006000 - - - - -10.288000 - - - - -10.304000 - - - - -10.035000 - - - - -10.155000 - - - - -9.858000 - - - - -9.573000 - - - - -10.155000 - - - - -9.946000 - - - - -9.981000 - - - - -10.462000 - - - - -10.254000 - - - - -10.492000 - - - - -10.238000 - - - - -10.425000 - - - - -10.966000 - - - - -10.071000 - - - - -9.936000 - - - - -9.972000 - - - - -10.103000 - - - - -10.300000 - - - - -10.467000 - - - - -10.855000 - - - - -10.167000 - - - - -10.373000 - - - - -10.184000 - - - - -10.767000 - - - - -10.431000 - - - - -10.515000 - - - - -10.942000 - - - - -10.754000 - - - - -11.498000 - - - - -10.758000 - - - - -11.066000 - - - - -11.164000 - - - - -11.230000 - - - - -11.294000 - - - - -11.217000 - - - - -11.331000 - - - - -11.153000 - - - - -11.730000 - - - - -10.778000 - - - - -12.492000 - - - - -10.680000 - - - - -12.426000 - - - - -11.938000 - - - - -12.267000 - - - - -12.176000 - - - - -12.191000 - - - - -12.565000 - - - - -12.457000 - - - - -12.138000 - - - - -11.837000 - - - - -11.972000 - - - - -11.706000 - - - - -12.507000 - - - - -12.110000 - - - - -12.224000 - - - - -13.297000 - - - - -13.106000 - - - - -13.183000 - - - - -12.920000 - - - - -12.844000 - - - - -13.053000 - - - - -13.202000 - - - - -12.726000 - - - - -13.598000 - - - - -13.463000 - - - - -13.831000 - - - - -13.663000 - - - - -13.513000 - - - - -13.820000 - - - - -13.760000 - - - - -13.575000 - - - - -13.327000 - - - - -13.553000 - - - - -13.660000 - - - - -13.332000 - - - - -13.481000 - - - - -13.340000 - - - - -13.083000 - - - - -12.435000 - - - - -13.156000 - - - - -13.072000 - - - - -13.103000 - - - - -12.406000 - - - - -14.975000 - - - - -14.132000 - - - - -15.527000 - - - - -14.594000 - - - - -14.297000 - - - - -13.854000 - - - + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + diff --git a/Assets/Scripts/KerstSpecial/NL3D2024.txt b/Assets/Scripts/KerstSpecial/NL3D2024.txt new file mode 100644 index 00000000..6bcab3d5 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/NL3D2024.txt @@ -0,0 +1,98 @@ + + + + NL3D2024 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + 0.00000 + + + + + + diff --git a/Assets/Scripts/KerstSpecial/NL3D2024.txt.meta b/Assets/Scripts/KerstSpecial/NL3D2024.txt.meta new file mode 100644 index 00000000..1fdb35e0 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/NL3D2024.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c60282f791b2b0a4896af9c3c4a0e929 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/KerstSpecial/RaceController.cs b/Assets/Scripts/KerstSpecial/RaceController.cs index c40b9df7..1dedd18d 100644 --- a/Assets/Scripts/KerstSpecial/RaceController.cs +++ b/Assets/Scripts/KerstSpecial/RaceController.cs @@ -39,6 +39,13 @@ public class RaceController : MonoBehaviour private Rigidbody playerRigidBody; private OpticalRaycaster raycaster; + private Vector2[] zoneCenters = new Vector2[4] { + new Vector2(53.241309f, 5.857816f), + new Vector2(53.232692f, 5.853782f), + new Vector2(53.224009f, 5.850627f), + new Vector2(53.217379f, 5.847194f) + }; + [SerializeField] private FloatEvent horizontalInput; [SerializeField] private FloatEvent verticalInput; [SerializeField] private FloatEvent upDownInput; @@ -50,6 +57,7 @@ public class RaceController : MonoBehaviour private MeshCollider nothingMeshCollider; private GameObject currentCheckpoint; + private GameObject[] zoneObjects = new GameObject[4]; private void Start() { @@ -61,11 +69,17 @@ private void Start() jumpInput.AddListenerStarted(Jump); GetCoordinatesForRoute(); + GenerateZones(); InitPlayer(); nothingMeshCollider = FindObjectOfType().gameObject.GetComponent(); } + private void OnFinish() + { + + } + private void InitPlayer() { player = GameObject.CreatePrimitive(PrimitiveType.Capsule); @@ -95,9 +109,14 @@ private void Jump(bool jump) } } - private void OnCollisionEnter(Collision collision) + private void OnEnter(Collider other, ZoneTrigger zone) + { + Debug.Log("ONENTER" + other); + } + + private void OnExit(Collider other, ZoneTrigger zone) { - Debug.Log("HAVING COLLISION" + collision); + Debug.Log("ONEXIT:" + other); } private Vector3 floorPoint = Vector3.zero; @@ -183,9 +202,11 @@ private void Update() freeCam.transform.rotation = Quaternion.Slerp(freeCam.transform.rotation, cameraStartRotation, Time.deltaTime * camLerpSpeed); } else - { - if(!isReadyForStart) + { + if (!isReadyForStart) + { player.transform.position = freeCam.transform.position + freeCam.transform.forward * playerDistToCamera; + } isReadyForStart = true; } @@ -230,14 +251,14 @@ private void CheckNextCoordinate() Vector3 unityCoord = nextCoord.ToUnity(); unityCoord.y = player.transform.position.y; float distance = Vector3.Distance(player.transform.position, unityCoord); - Debug.Log("distance to next target" + distance); + //Debug.Log("distance to next target" + distance); if(distance < checkPointScale) { Destroy(currentCheckpoint); currentCoordinateIndex++; nextCoord = new Coordinate(CoordinateSystem.WGS84, routeCoords[currentCoordinateIndex].x, routeCoords[currentCoordinateIndex].y, 0); - Debug.Log("WE HIT THE COORD" + currentCoordinateIndex); + //Debug.Log("WE HIT THE COORD" + currentCoordinateIndex); currentCheckpoint = SpawnCheckpoint(nextCoord); } } @@ -348,11 +369,12 @@ private void GetCoordinatesForRoute() if (routeFile != null) { routeCoords = ExtractLatLon(routeFile.text); + foreach(Vector2 c in routeCoords) + { + Coordinate nextCoord = new Coordinate(CoordinateSystem.WGS84, c.x, c.y, 0); + SpawnCheckpoint(nextCoord); + } - //foreach(Vector2 c in routeCoords) - //{ - // - //} } else { @@ -360,6 +382,27 @@ private void GetCoordinatesForRoute() } } + private void GenerateZones() + { + for (int i = 0; i < zoneCenters.Length; i++) + { + GameObject zoneObject = new GameObject("zonetrigger" + i.ToString()); + ZoneTrigger trigger = zoneObject.AddComponent(); + trigger.OnEnter += OnEnter; + trigger.OnExit += OnExit; + WorldTransform wt = zoneObject.AddComponent(); + GameObjectWorldTransformShifter shifter = zoneObject.AddComponent(); + wt.SetShifter(shifter); + BoxCollider bc = zoneObject.AddComponent(); + bc.isTrigger = true; + zoneObject.transform.localScale = Vector3.one * 1000; //1km per zone + Coordinate nextCoord = new Coordinate(CoordinateSystem.WGS84, zoneCenters[i].x, zoneCenters[i].y, 0); + Vector3 unityCoord = nextCoord.ToUnity(); + unityCoord.y = 3; + zoneObject.transform.position = unityCoord; + } + } + private GameObject SpawnCheckpoint(Coordinate coord) { GameObject routeObject = GameObject.CreatePrimitive(PrimitiveType.Cube); @@ -373,28 +416,59 @@ private GameObject SpawnCheckpoint(Coordinate coord) return routeObject; } - List ExtractLatLon(string gpxContent) + //List ExtractLatLon(string gpxContent) + //{ + // List latLonList = new List(); + // XmlDocument xmlDoc = new XmlDocument(); + // xmlDoc.LoadXml(gpxContent); + + // XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable); + // nsmgr.AddNamespace("gpx", "http://www.topografix.com/GPX/1/1"); + + // XmlNodeList trkptNodes = xmlDoc.SelectNodes("//gpx:trkpt", nsmgr); + + // foreach (XmlNode trkpt in trkptNodes) + // { + // if (trkpt.Attributes["lat"] != null && trkpt.Attributes["lon"] != null) + // { + // float lat = float.Parse(trkpt.Attributes["lat"].Value); + // float lon = float.Parse(trkpt.Attributes["lon"].Value); + // latLonList.Add(new Vector2(lat, lon)); + // } + // } + + // return latLonList; + //} + + private List ExtractLatLon(string filePath) { - List latLonList = new List(); - XmlDocument xmlDoc = new XmlDocument(); - xmlDoc.LoadXml(gpxContent); + List coordinates = new List(); - XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDoc.NameTable); - nsmgr.AddNamespace("gpx", "http://www.topografix.com/GPX/1/1"); + // Load and parse XML + XmlDocument xmlDoc = new XmlDocument(); + xmlDoc.LoadXml(filePath); - XmlNodeList trkptNodes = xmlDoc.SelectNodes("//gpx:trkpt", nsmgr); + // Find all "trkpt" elements (track points) + XmlNodeList trackPoints = xmlDoc.GetElementsByTagName("trkpt"); - foreach (XmlNode trkpt in trkptNodes) + foreach (XmlNode node in trackPoints) { - if (trkpt.Attributes["lat"] != null && trkpt.Attributes["lon"] != null) + if (node.Attributes != null) { - float lat = float.Parse(trkpt.Attributes["lat"].Value); - float lon = float.Parse(trkpt.Attributes["lon"].Value); - latLonList.Add(new Vector2(lat, lon)); + // Extract latitude and longitude + string lat = node.Attributes["lat"]?.InnerText; + string lon = node.Attributes["lon"]?.InnerText; + + if (!string.IsNullOrEmpty(lat) && !string.IsNullOrEmpty(lon)) + { + float latitude = float.Parse(lat); + float longitude = float.Parse(lon); + coordinates.Add(new Vector2(latitude, longitude)); + } } } - return latLonList; + return coordinates; } } } diff --git a/Assets/Scripts/KerstSpecial/ZoneTrigger.cs b/Assets/Scripts/KerstSpecial/ZoneTrigger.cs new file mode 100644 index 00000000..4db537f6 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/ZoneTrigger.cs @@ -0,0 +1,23 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Netherlands3D.Twin +{ + public class ZoneTrigger : MonoBehaviour + { + public delegate void ZoneHandler(Collider col, ZoneTrigger zone); + public event ZoneHandler OnEnter; + public event ZoneHandler OnExit; + + private void OnTriggerEnter(Collider other) + { + OnEnter?.Invoke(other, this); + } + + private void OnTriggerExit(Collider other) + { + OnExit?.Invoke(other, this); + } + } +} diff --git a/Assets/Scripts/KerstSpecial/ZoneTrigger.cs.meta b/Assets/Scripts/KerstSpecial/ZoneTrigger.cs.meta new file mode 100644 index 00000000..8c78f8f5 --- /dev/null +++ b/Assets/Scripts/KerstSpecial/ZoneTrigger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f343cb953007284a814431f457cb742 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 4e159ebb74658dd91fc8cbf951bc0425650aa9ba Mon Sep 17 00:00:00 2001 From: bozmir <49904467+bozmir@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:09:19 +0100 Subject: [PATCH 2/2] disabling all test checkpoints --- Assets/Scripts/KerstSpecial/RaceController.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/KerstSpecial/RaceController.cs b/Assets/Scripts/KerstSpecial/RaceController.cs index 1dedd18d..5c19c9a6 100644 --- a/Assets/Scripts/KerstSpecial/RaceController.cs +++ b/Assets/Scripts/KerstSpecial/RaceController.cs @@ -369,11 +369,11 @@ private void GetCoordinatesForRoute() if (routeFile != null) { routeCoords = ExtractLatLon(routeFile.text); - foreach(Vector2 c in routeCoords) - { - Coordinate nextCoord = new Coordinate(CoordinateSystem.WGS84, c.x, c.y, 0); - SpawnCheckpoint(nextCoord); - } + //foreach(Vector2 c in routeCoords) + //{ + // Coordinate nextCoord = new Coordinate(CoordinateSystem.WGS84, c.x, c.y, 0); + // SpawnCheckpoint(nextCoord); + //} } else