Skip to content

Commit a2547c2

Browse files
author
gamedevgrunt
committed
Fix camera bug on mobile, where camera pointed perfectly down would flip
1 parent 76565fc commit a2547c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/utils/camera.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ export function setupCamera(scene, target, engine) {
1313

1414
// More Professional Limited Camera, avoids collision
1515
camera.wheelDeltaPercentage = 0.0200;
16-
camera.upperBetaLimit = 3.13;
16+
// camera.upperBetaLimit = 3.13;
1717
camera.lowerRadiusLimit = 4; // Minimum distance to target (closest zoom)
1818
camera.upperRadiusLimit = 656.8044;
1919
camera.upperBetaLimit = Math.PI / 2; // Stops at the horizon (90 degrees)
20+
camera.lowerBetaLimit = (Math.PI / 2) * 0.01; // Slightly below the top-down view
2021
camera.alpha = 4.954;
2122
camera.beta = 1.3437;
2223

0 commit comments

Comments
 (0)