Fix physique boule (moins de drag) + billboard name tags vers caméra

- turnDamping 7→1.5, idleDrag 3→0.2 : comportement boule plus naturel
- Fix billboard : LookRotation inversé (texte faisant face à la caméra, pas dos)
  s'applique aux labels local (PlayerController) et remote (RemotePlayerController)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-17 16:47:13 +02:00
parent c835f932b0
commit 526d30c569
2 changed files with 5 additions and 9 deletions

View File

@@ -241,17 +241,14 @@ public class RemotePlayerController : MonoBehaviour
transform.rotation = _currentRotation;
}
// Keep name label floating ABOVE the ball (world position, not local)
// Billboard: always face camera, locked to vertical axis
if (_nameLabelObj != null)
{
_nameLabelObj.transform.position = transform.position + Vector3.up * 1.5f;
var cam = Camera.main;
if (cam != null)
{
// Billboard locked to Y axis — only rotate around vertical
Vector3 lookDir = _nameLabelObj.transform.position - cam.transform.position;
lookDir.y = 0f; // Lock to horizontal plane
Vector3 lookDir = cam.transform.position - _nameLabelObj.transform.position;
lookDir.y = 0f;
if (lookDir.sqrMagnitude > 0.001f)
_nameLabelObj.transform.rotation = Quaternion.LookRotation(lookDir);
}