Fix split view rotation sync direction

This commit is contained in:
Aymeric Rabot
2026-06-08 01:10:04 -04:00
parent 8dc602caa9
commit f7789a5c7a
@@ -1684,13 +1684,13 @@ function nearestEquivalentDegrees(angle: number, reference: number) {
function floorplanRotationFromCameraAzimuth(azimuth: number, reference: number) { function floorplanRotationFromCameraAzimuth(azimuth: number, reference: number) {
return nearestEquivalentDegrees( return nearestEquivalentDegrees(
radiansToDegrees(azimuth) - FLOORPLAN_VIEW_ROTATION_DEG, FLOORPLAN_VIEW_ROTATION_DEG - radiansToDegrees(azimuth),
reference, reference,
) )
} }
function cameraAzimuthFromFloorplanRotation(rotationDeg: number) { function cameraAzimuthFromFloorplanRotation(rotationDeg: number) {
return degreesToRadians(rotationDeg + FLOORPLAN_VIEW_ROTATION_DEG) return degreesToRadians(FLOORPLAN_VIEW_ROTATION_DEG - rotationDeg)
} }
function floorplanLocalToWorldPoint( function floorplanLocalToWorldPoint(