diff --git a/impulse/Assets/Prefab/Road Parts/Down.prefab b/impulse/Assets/Prefab/Road Parts/Down.prefab index 2855563f4b4885a21113fe1443c60e1353075d2f..6b64fd60670edda00b406e96799caa42cb482729 100644 --- a/impulse/Assets/Prefab/Road Parts/Down.prefab +++ b/impulse/Assets/Prefab/Road Parts/Down.prefab @@ -195,7 +195,7 @@ Transform: m_GameObject: {fileID: 1691757651383122259} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -2.01, y: 1.54, z: 9.98} + m_LocalPosition: {x: -2.01, y: 1.324, z: 9.98} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -776,7 +776,7 @@ Transform: m_GameObject: {fileID: 6391604545287046411} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -2.01, y: 8.78, z: -9.91} + m_LocalPosition: {x: -2.01, y: 8.3, z: -9.91} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: diff --git a/impulse/Assets/Prefab/Road Parts/Up.prefab b/impulse/Assets/Prefab/Road Parts/Up.prefab index dd35fc6a720b804f59ce859e5ff0f35390d38172..3868fa13c6a599937e24b88a4d74b4e9c6a94f17 100644 --- a/impulse/Assets/Prefab/Road Parts/Up.prefab +++ b/impulse/Assets/Prefab/Road Parts/Up.prefab @@ -258,7 +258,7 @@ Transform: m_GameObject: {fileID: 2901184472215781863} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -2.01, y: 8.78, z: 9.91} + m_LocalPosition: {x: -2.01, y: 8.367, z: 9.91} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: @@ -418,7 +418,7 @@ Transform: m_GameObject: {fileID: 4863811603078127115} serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -2.01, y: 1.54, z: -9.91} + m_LocalPosition: {x: -2.01, y: 1.324, z: -9.91} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: diff --git a/impulse/Assets/Scripts/Road/RoadGenerator.cs b/impulse/Assets/Scripts/Road/RoadGenerator.cs index 5c1238db3e73961b6a8da9521652303a14069334..902be7d6f8390b2a954e80d7b49430fef9560c04 100644 --- a/impulse/Assets/Scripts/Road/RoadGenerator.cs +++ b/impulse/Assets/Scripts/Road/RoadGenerator.cs @@ -35,7 +35,9 @@ public class RoadGenerator : MonoBehaviour void Start() { - //Random.InitState(1203); + //int seed = (int)System.DateTime.Now.Ticks; + //Debug.Log("Seed custom utilisé : " + seed); + Random.InitState(-1324498718); ApplyPlayerPrefs(this.roadPartBlueprintList); // Fix iterations @@ -143,11 +145,9 @@ public class RoadGenerator : MonoBehaviour if (IsColliding(nextRoadPart)) { FixRoad(previousRoadPart, nextRoadPart); - } - - if (!IsColliding(nextRoadPart)) + } else { - placedRoads.Add(nextRoadPart); + placedRoads.Add(nextRoadPart); } } LogManager.Instance.RegisterParcourLength(CalculateTotalDistanceFromStartEnd());