fuzzyworld

tower / commit

fix(interior): the horizon stays put, the head tips

45ce839c6e30bd22c848a9067b960d0a9ba25ade · Pavel Safronov · 2026-09-08 16:45:44 -0700 · parents 7ee1bc275720

fix(interior): the horizon stays put, the head tips

d5b08a6 flipped both drag axes together. Yaw was right to flip — the
scene should follow the finger — but pitch reads better inverted: a
downward drag lifts the gaze, the way it does in a cockpit rather than
on a map. Only the vertical axis goes back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
 src/views/interior.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/views/interior.ts b/src/views/interior.ts
index d56970c..66f4cc7 100644
--- a/src/views/interior.ts
+++ b/src/views/interior.ts
@@ -1099,7 +1099,7 @@ export class InteriorView {
       // Scale with the field of view, so zoomed in does not mean flung around.
       const rate = (this.fovDeg / 60) * 0.0032
       this.yaw += dx * rate
-      this.pitch = Math.max(-1.55, Math.min(1.55, this.pitch - dy * rate))
+      this.pitch = Math.max(-1.55, Math.min(1.55, this.pitch + dy * rate))
       this.place()
       this.cb.onLook()
       this.queueSave()