Fix ViewportPosToMapPos using the wrong rotation

This commit is contained in:
ζeh Matt committed 2024-03-05 10:23:30 +02:00
1 parent a33cc1ac86
commit d95f14dcda
7 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -958,7 +958,7 @@ void WindowViewportGetMapCoordsByCursor(
// Compute map coordinate by mouse position.
auto viewportPos = w.viewport->ScreenToViewportCoord(mouseCoords);
auto coordsXYZ = ViewportAdjustForMapHeight(viewportPos, w.viewport->rotation);
auto mapCoords = ViewportPosToMapPos(viewportPos, coordsXYZ.z);
auto mapCoords = ViewportPosToMapPos(viewportPos, coordsXYZ.z, w.viewport->rotation);
*map_x = mapCoords.x;
*map_y = mapCoords.y;