Attach Camera to Player

This commit is contained in:
pelpanagiotis
2026-02-09 21:58:30 +02:00
parent 9bcb47d8f6
commit aa248cda7e
10 changed files with 222 additions and 108 deletions

View File

@@ -34,7 +34,9 @@ namespace QuickStart
Camera.main.transform.SetParent(transform);
Camera.main.transform.localPosition = new Vector3(0, 0, 0);
floatingInfo.transform.localPosition = new Vector3(0, -0.3f, 0.6f);
// Move the floatingInfo (player name) above the player instead of below.
// Adjust Y to fit your model height (2.0f is a good starting point for standard humanoid scale).
floatingInfo.transform.localPosition = new Vector3(0, 2.0f, 0.6f);
floatingInfo.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
string name = "Player" + Random.Range(100, 999);