From eaa5b5c48d340c8aedd244b306459550e791bdc5 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 8 Apr 2026 12:14:51 +0200 Subject: [PATCH] fix: negate AC heading for correct E/W compass orientation AC's Actions.Heading uses opposite rotation from standard math angles (confirmed by UtilityBelt's HeadingToQuaternion negation). Co-Authored-By: Claude Opus 4.6 (1M context) --- static/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index cc539124..dca9d60b 100644 --- a/static/script.js +++ b/static/script.js @@ -3726,7 +3726,8 @@ function updateRadarWindow(msg) { // Always heading-up: player facing direction = up on canvas. // Compass labels rotate around the edge based on player heading. - const headingRad = playerHeading * Math.PI / 180; + // AC heading convention is opposite from standard math angles — negate + const headingRad = -playerHeading * Math.PI / 180; const compassLabels = [ { label: 'N', angle: 0 }, { label: 'E', angle: Math.PI / 2 },