Passenger/driver sit still in moving cars: seat pose sent relative to the vehicle (backward-compatible), no backward pull; remote cars/traffic extrapolate in physics time and interpolate; UI polish (shadows, borders, gradient buttons, server list hover, fill bars, colored ping)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
33a415139b
commit
ce2fbdfc10
+2
-2
@@ -100,7 +100,7 @@ namespace MSCO
|
||||
c.TargetPos = p;
|
||||
c.TargetRot = q;
|
||||
c.TargetVel = v;
|
||||
c.TargetTime = Time.time;
|
||||
c.TargetTime = Time.fixedTime; // Physik-Zeit wie in FixedUpdate (sonst negatives Alter = Rucken)
|
||||
if (!c.Following)
|
||||
{
|
||||
c.WasKinematic = c.Rb.isKinematic;
|
||||
@@ -117,7 +117,7 @@ namespace MSCO
|
||||
foreach (Car c in cars.Values)
|
||||
{
|
||||
if (!c.Following || c.Rb == null) continue;
|
||||
float ahead = Mathf.Min(Time.time - c.TargetTime, MaxExtrapolation);
|
||||
float ahead = Mathf.Clamp(Time.fixedTime - c.TargetTime, 0f, MaxExtrapolation);
|
||||
Vector3 goal = c.TargetPos + c.TargetVel * ahead;
|
||||
float t = Mathf.Clamp01(Time.fixedDeltaTime * Smoothing);
|
||||
if ((c.Rb.position - goal).sqrMagnitude > 25f) { c.Rb.position = goal; c.Rb.rotation = c.TargetRot; continue; }
|
||||
|
||||
Reference in New Issue
Block a user