Update index.html
Browse files- index.html +3 -3
index.html
CHANGED
|
@@ -352,9 +352,9 @@
|
|
| 352 |
const cameraY = playerPos.y + cameraHeight + Math.sin(cameraRotation.x) * cameraDistance;
|
| 353 |
const cameraZ = playerPos.z + Math.cos(cameraRotation.y) * cameraDistance * Math.cos(cameraRotation.x);
|
| 354 |
|
| 355 |
-
// Clamp camera inside garage bounds
|
| 356 |
-
let clampedX = Math.max(-
|
| 357 |
-
let clampedZ = Math.max(-
|
| 358 |
let clampedY = Math.max(0.3, Math.min(15, cameraY));
|
| 359 |
|
| 360 |
camera.position.set(clampedX, clampedY, clampedZ);
|
|
|
|
| 352 |
const cameraY = playerPos.y + cameraHeight + Math.sin(cameraRotation.x) * cameraDistance;
|
| 353 |
const cameraZ = playerPos.z + Math.cos(cameraRotation.y) * cameraDistance * Math.cos(cameraRotation.x);
|
| 354 |
|
| 355 |
+
// Clamp camera inside garage bounds based on actual garage dimensions
|
| 356 |
+
let clampedX = Math.max(-2.2, Math.min(4, cameraX));
|
| 357 |
+
let clampedZ = Math.max(-4, Math.min(3.5, cameraZ));
|
| 358 |
let clampedY = Math.max(0.3, Math.min(15, cameraY));
|
| 359 |
|
| 360 |
camera.position.set(clampedX, clampedY, clampedZ);
|