summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-02-04 00:30:56 +0100
committerAki <please@ignore.pl>2023-02-04 00:30:56 +0100
commitff51d69ede2e6e9393e3a9d349ea645ae65c5bb7 (patch)
tree543a46ac56efac0119bbdf7aaf8b6a29c4ccd895 /engine
parentbbeb0c2f34901f840517d702b74e770eb1c49783 (diff)
downloadkurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.zip
kurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.tar.gz
kurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.tar.bz2
Fixed scaling order when transforming screen to world
Diffstat (limited to 'engine')
-rw-r--r--engine/src/Camera.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/src/Camera.cpp b/engine/src/Camera.cpp
index 60e8aa1..41cc5ab 100644
--- a/engine/src/Camera.cpp
+++ b/engine/src/Camera.cpp
@@ -17,7 +17,7 @@ static auto viewport() -> Point;
Point
Camera::to_world(const Point& screen) const
{
- return screen - viewport().scale(1.0 / (2.0 * scale)) + offset;
+ return (screen - viewport().scale(0.5)).scale(1.0 / scale) + offset;
}