Update index.html
Browse files- index.html +6 -3
index.html
CHANGED
|
@@ -1048,9 +1048,12 @@
|
|
| 1048 |
this.carSpeed *= 0.92;
|
| 1049 |
}
|
| 1050 |
|
| 1051 |
-
// Turning with speed-dependent responsiveness
|
| 1052 |
-
if (Math.abs(this.carSpeed) >
|
| 1053 |
-
|
|
|
|
|
|
|
|
|
|
| 1054 |
if (left) {
|
| 1055 |
this.carRotation += this.turnSpeed * turnMultiplier;
|
| 1056 |
}
|
|
|
|
| 1048 |
this.carSpeed *= 0.92;
|
| 1049 |
}
|
| 1050 |
|
| 1051 |
+
// Turning with inverse speed-dependent responsiveness (sharper turns at low speed)
|
| 1052 |
+
if (Math.abs(this.carSpeed) > 0.5) {
|
| 1053 |
+
// Calculate turn multiplier - higher at low speeds, lower at high speeds
|
| 1054 |
+
const speedRatio = Math.abs(this.carSpeed) / this.maxSpeed;
|
| 1055 |
+
const turnMultiplier = Math.max(0.3, 2.5 - (speedRatio * 2.2)); // Sharp at low speed, gentle at high speed
|
| 1056 |
+
|
| 1057 |
if (left) {
|
| 1058 |
this.carRotation += this.turnSpeed * turnMultiplier;
|
| 1059 |
}
|