Création 5

This commit is contained in:
Alex38Lyon
2025-06-03 09:02:00 +02:00
parent a49244f81f
commit 2c178e2110
8 changed files with 411 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
using UnityEngine;
using Unity.FPS.Gameplay;
using TMPro;
// using StarterAssets; // <- ajoute ceci si tu utilises StarterAssets
public class DisplayCharacterHeight : MonoBehaviour
{
// public Transform headTransform;
public TextMeshProUGUI heightText; // le champ TMP dans l'UI
public PlayerCharacterController PlayerController;
void Update()
{
float height = PlayerController.CurrentCharacterHeight;
heightText.text = $"({height:F2}m)";
// Debug.Log("Character height: " + height);
}
}