Skip to content

Gameplay tests: fix the inverted camera-measured pitch - #8940

Merged
4ian merged 1 commit into
masterfrom
claude/gameplay-tests-camera-pitch-sign
Aug 9, 2026
Merged

Gameplay tests: fix the inverted camera-measured pitch#8940
4ian merged 1 commit into
masterfrom
claude/gameplay-tests-camera-pitch-sign

Conversation

@4ian

@4ian 4ian commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The pitch of a camera view is rotationX - 90, not 90 - rotationX: rotationX is 0 looking straight down (a pitch of -90) and 90 at the horizon, so beyond 90 the view tilts up. The previous formula had the right magnitude and the wrong sign, so lookTowardWithMouseDelta converged to the mirrored vertical aim — measured in two different games (FPS: ended at rotationX 93.16, tilted up by exactly the 3.16° it should have tilted down; farming: sweeping down moved pitchDiff further from zero). getCameraState's documentation is updated to state the convention (rotationX - 90, positive = looking up).

Validated: GDJS type-check and build clean, harness karma suite 32/32.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AaQQdPZ68X8zkybtsxWE1b


Generated by Claude Code

The pitch of a camera view is rotationX - 90, not 90 - rotationX:
rotationX is 0 looking straight down (a pitch of -90) and 90 at the
horizon, so beyond 90 the view tilts UP. The previous formula had the
right magnitude and the wrong sign, so lookTowardWithMouseDelta
converged to the mirrored vertical aim (measured: tilted up by exactly
the angle it should have tilted down by, in two different games).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaQQdPZ68X8zkybtsxWE1b
@4ian
4ian merged commit d1b3797 into master Aug 9, 2026
4 of 6 checks passed
@4ian
4ian deleted the claude/gameplay-tests-camera-pitch-sign branch August 9, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants