From 80c944f6b0a68a6cfa781c23115e9086f1fdf820 Mon Sep 17 00:00:00 2001 From: nexovec Date: Sat, 29 Jan 2022 19:07:18 +0100 Subject: [PATCH] fixed spiral --- Assets/Scripts/ProceduralGeneration.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ProceduralGeneration.cs b/Assets/Scripts/ProceduralGeneration.cs index 85a8c08..dcd0776 100644 --- a/Assets/Scripts/ProceduralGeneration.cs +++ b/Assets/Scripts/ProceduralGeneration.cs @@ -25,7 +25,7 @@ public class ProceduralGeneration : MonoBehaviour { // configuration: float heightOffset = 10f; - float horizontalDistancePerPlatform = 60; + float horizontalDistancePerPlatform = 10f; // List levelBlocksSpawnTemp = new List(); @@ -42,7 +42,7 @@ public class ProceduralGeneration : MonoBehaviour Vector3 direction = rotation * Vector3.down; Vector3 position = (lastObject.transform.position + (direction * radius)); - levelBlocksSpawnTemp.Add(Instantiate(objToSpawn, new Vector3(position.x, position.y + heightOffset, position.z + (float)(i * heightOffset)), rotation)); + levelBlocksSpawnTemp.Add(Instantiate(objToSpawn, new Vector3(position.x, position.y + heightOffset, position.z + (float)(i * horizontalDistancePerPlatform)), rotation)); } return levelBlocksSpawnTemp;