From 5094ec04f918b9bc9846cdf716820c6d9ea3971c Mon Sep 17 00:00:00 2001 From: cemt1363 Date: Sat, 6 Jun 2026 13:51:52 +0200 Subject: [PATCH] NO MORE HOLE --- Game/Assets/Scripts/TreeSpawner.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Game/Assets/Scripts/TreeSpawner.cs b/Game/Assets/Scripts/TreeSpawner.cs index b214537..c75379f 100644 --- a/Game/Assets/Scripts/TreeSpawner.cs +++ b/Game/Assets/Scripts/TreeSpawner.cs @@ -9,6 +9,9 @@ public class TreeSpawner : MonoBehaviour void Update() { + + Debug.Log("TreeSpawner running"); + if (hasSpawned) return; if (player.position.y < transform.position.y - 3f) @@ -16,7 +19,7 @@ public class TreeSpawner : MonoBehaviour hasSpawned = true; float treeHeight = GetComponent().bounds.size.y; - Vector3 spawnPos = transform.position + Vector3.down * treeHeight; + Vector3 spawnPos = (transform.position + Vector3.down * treeHeight) - new Vector3(0,-0.2f,0); Instantiate(treePrefab, spawnPos, Quaternion.identity); }