aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/InputSystem.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-06 15:27:44 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-06 15:27:44 +0100
commitceb41b7ae7e2734af954364b319fc0b6f2a86c2f (patch)
treef7544f5f68236be02eb96a7d381bce9ad41845dc /src/crepe/system/InputSystem.cpp
parente9cba1baee564d835b8a3473a9cb146825f56732 (diff)
parent77d02bf2e2d5d04e8cacb3c783446541517e8e76 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/enemyAI
Diffstat (limited to 'src/crepe/system/InputSystem.cpp')
-rw-r--r--src/crepe/system/InputSystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index 91c9c64..be7eda6 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -216,7 +216,7 @@ bool InputSystem::is_mouse_inside_button(
if (!button.data.world_space) {
actual_pos += cam_transform.position;
}
- vec2 half_dimensions = button.dimensions / 2;
+ vec2 half_dimensions = button.dimensions * transform.scale / 2;
return mouse_pos.x >= actual_pos.x - half_dimensions.x
&& mouse_pos.x <= actual_pos.x + half_dimensions.x