Code-only first pass. The local Player.prefab (ball) is still in the scene
until the user creates the PlayerCar / RemoteCar prefab variants in the Editor.
New scripts:
- VehicleLocalSetup: attaches name label + colored capsule marker to the local
vehicle, registers its Rigidbody with NetworkManager for broadcast.
- RemoteVehicleSync: snapshot interpolation for remote vehicles. Disables the
NWH VehicleController + every WheelController + every AudioSource on init.
Makes the rigidbody kinematic, MovePosition-driven from network. Disables all
non-trigger colliders during the 1.5s spawn grace window to avoid ejecting
overlapping locals at connect.
Adapted scripts:
- NetworkManager: RegisterLocalVehicle(Transform, Rigidbody) replaces the
FindFirstObjectByType<PlayerController>() lookup. Remote spawn now wires
RemoteVehicleSync instead of RemotePlayerController.
- LobbyUI: OnConnected drives VehicleLocalSetup.SetupLocal; OnDisconnected
toggles NWH.VehicleController instead of PlayerController.
- GameManager.SetPlayerActive: toggles VehicleController, not PlayerController.
- DebugNetworkUI: live position read from VehicleController.vehicleRigidbody.
- ChatUI: drops PlayerController.ResetInputs() (NWH polls Input System each
frame; no manual reset needed when chat opens).
- StatsTracker: drops dead _pc field; Rigidbody still gets resolved via
GetComponent on the host GameObject (will be the vehicle on Car).
Frontend (deployed earlier on master): build_ball replaces pretty_build assets.
- PlayerController: block WASD/jump callbacks when ChatUI is open
- PlayerController: clic droit = unlock souris, clic gauche = re-lock (n'est plus un toggle)
- PlayerController: ajoute ResetInputs() appelé à l'ouverture du chat
- ChatUI: appelle ResetInputs() quand le panel s'ouvre pour éviter les touches collées
- NetworkManager: seed les joueurs déjà présents dans la room à la connexion
(les OnAdd Colyseus peuvent être manqués si l'état est décodé avant l'enregistrement des callbacks)
- NetworkManager: garde anti-doublon dans OnPlayerAdd
- NetworkManager: fallback sphere si remotePlayerPrefab est null
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Unity build last_build remplace build_mai
- NetworkSchema.cs: correction types sbyte pour int8 (fix OverflowException Colyseus)
- StatsTracker: envoi periodique toutes les 30s, plus de dependance aux round events
- StatsTracker: cooldown client 6s pour respecter le rate-limit serveur
- StatsPage: correction row.value au lieu de row[activeTab]
- StatsPage: suppression onglet Courses (racesPlayed)
- Backend index.js: logging POST /stats/update
- Scene Tutorial: mise a jour, suppression assets obsoletes (TutorialInfo, physicMaterials)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ChatUI: PlayerName utilise PlayerPrefs comme fallback si non connecte
- NetworkManager: sauvegarde le nom dans PlayerPrefs a la connexion
- GameCanvas: version build bump -> 20260517b (cache bust)
- Nouveaux fichiers build_mai (data + wasm mis a jour)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Colyseus disconnectait le client si le handler chat n'était pas
déployé côté serveur. Le endpoint HTTP /chat/send broadcaste déjà
dans les rooms Colyseus, donc le path Colyseus est superflu.
Ajout poll immédiat après envoi pour affichage sans délai.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- PlayerController: MovementSpeed 5->25, ajout turnDamping+idleDrag pour virages nets
- CheckpointSystem: auto-assign checkpointIndex depuis l'array, déclenche race HUD sur CP0
- GameHUD: course visible dès passage de la porte (CP0), timer local indépendant du serveur
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>