fix: rotation, smooth camera, ship portal collider, obstacle block collider, player rigid body detection, dynamic ground (#54)

This commit is contained in:
2025-04-06 17:24:10 +02:00
committed by GitHub
parent be5ea1e60a
commit 53af80411f
16 changed files with 222 additions and 187 deletions

View File

@@ -7,6 +7,7 @@ public class LevelLoader : MonoBehaviour
public LevelsLoader levelsLoader;
public AudioSource audioSource;
public Text progressionText;
private readonly float groundY = -6.034f;
private GameObject GetPrefab(string type)
{
@@ -43,6 +44,12 @@ public class LevelLoader : MonoBehaviour
instance.transform.localScale = new Vector3(newScaleX, newScaleY, originalScale.z);
}
GameObject groundPrefab = GetPrefab("Ground");
GameObject groundInstance = Instantiate(groundPrefab, new Vector3(current.LastX / 2, groundY, 0), Quaternion.identity);
float groundWidth = current.LastX;
groundInstance.transform.localScale = new Vector3(groundWidth / 5f * 2, 1, 1);
Instantiate(GetPrefab("WinnerWall"), new Vector3(current.LastX, 0, 0), Quaternion.Euler(0, 0, 90));
}