Door/hood sync via hinge spring instead of teleport (fixes NaN crash and parts falling off); join/leave toasts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 16:59:01 +02:00
co-authored by Claude Opus 5.5
parent 097d1e87de
commit 526f9e9c77
7 changed files with 178 additions and 44 deletions
+1
View File
@@ -58,6 +58,7 @@ namespace MSCO
if (w.Model == null || w.Hub == null) continue;
float speed = Vector3.Dot(vel, w.Hub.forward);
w.Angle = Mathf.Repeat(w.Angle + speed / w.Radius * Mathf.Rad2Deg * dt, 360f);
if (float.IsNaN(w.Angle) || float.IsInfinity(w.Angle)) w.Angle = 0f;
// Hat das Spiel das Modell in diesem Frame selbst gedreht (z.B. Lenkung), ist das die neue Basis
Quaternion current = w.Model.localRotation;