Skip to content

Commit 222713b

Browse files
wass08claude
andcommitted
fix(editor): point compass needle at true north, not camera
The compass needle rotation was `-floorplanUserRotationDeg`, but the 2D-floorplan SVG and 3D camera projections both place true north at `+floorplanUserRotationDeg` (= cameraAzimuth − 90°). The negated sign made the needle rotate opposite to north as the camera orbits, so it appeared to track the camera instead of pointing north. The formula was written for the 2D floorplan and reused verbatim when the compass was portaled into the 3D viewer; both instances had the flipped sign. "Align to north" is unaffected (userRotation 0 → up). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2e5a4ff commit 222713b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/editor/src/components/editor/floorplan-panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10316,14 +10316,14 @@ export function FloorplanPanel({
1031610316
(compassHost ? (
1031710317
createPortal(
1031810318
<FloorplanCompassButton
10319-
northRotationDeg={-floorplanUserRotationDeg}
10319+
northRotationDeg={floorplanUserRotationDeg}
1032010320
onAlignNorth={alignFloorplanViewToNorth}
1032110321
/>,
1032210322
compassHost,
1032310323
)
1032410324
) : (
1032510325
<FloorplanCompassButton
10326-
northRotationDeg={-floorplanUserRotationDeg}
10326+
northRotationDeg={floorplanUserRotationDeg}
1032710327
onAlignNorth={alignFloorplanViewToNorth}
1032810328
/>
1032910329
))}

0 commit comments

Comments
 (0)