diff options
author | Aki <please@ignore.pl> | 2023-02-04 00:30:56 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-04 00:30:56 +0100 |
commit | ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7 (patch) | |
tree | 543a46ac56efac0119bbdf7aaf8b6a29c4ccd895 | |
parent | bbeb0c2f34901f840517d702b74e770eb1c49783 (diff) | |
download | kurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.zip kurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.tar.gz kurator-ff51d69ede2e6e9393e3a9d349ea645ae65c5bb7.tar.bz2 |
Fixed scaling order when transforming screen to world
-rw-r--r-- | engine/src/Camera.cpp | 2 |
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; } |