Skip to content

Gameplay tests: fix the camera-measured yaw, expose the aim tolerance - #8939

Merged
4ian merged 1 commit into
masterfrom
claude/gameplay-tests-aim-fixes
Aug 9, 2026
Merged

Gameplay tests: fix the camera-measured yaw, expose the aim tolerance#8939
4ian merged 1 commit into
masterfrom
claude/gameplay-tests-aim-fixes

Conversation

@4ian

@4ian 4ian commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Both issues reported from the starter tests were valid:

  • Camera yaw was 90° out. The world direction a 3D camera looks at is its angle - 90: with the ZYX rotation order, a camera pitched to the horizon faces the former "screen-up" direction, which is why games (e.g. LookFromObjectEyes) set the camera angle to facing + 90. getRelativePosition's fromCamera yaw now subtracts that offset — the reported yawDiff: -90.04 while demonstrably facing the target becomes ~0, and lookTowardWithMouseDelta's camera mode inherits the fix. (The pitch from the same call was already exact.)
  • toleranceDegrees exposed on lookTowardWithMouseDelta (default 3): a shooting test needs "aimed well enough to hit", which can be under a degree on a small or far target — at 1.3° off the helper reported aimed: true and a second call stepped zero frames.

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 world direction a 3D camera looks at is its angle minus 90 (games
set the camera angle to 'facing + 90'): getRelativePosition's
fromCamera yaw was off by that offset, turning the view away when
driven to zero. Also expose toleranceDegrees on
lookTowardWithMouseDelta (default 3): a shooting test needs 'aimed
well enough to hit', which can be under a degree on a far target.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AaQQdPZ68X8zkybtsxWE1b
@4ian
4ian merged commit 8cdd1c6 into master Aug 9, 2026
5 of 6 checks passed
@4ian
4ian deleted the claude/gameplay-tests-aim-fixes branch August 9, 2026 14:54
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