aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-06 10:50:01 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2025-01-06 10:50:01 +0100
commit92dfde9a56f5a607269e8908002a72bec85357bd (patch)
tree16283391b01f2cc4e59c326377ec2dbf605d3540
parentcf6ca6be5a9deac4de921f50d0aedf6a6156e0f4 (diff)
bug fix
-rw-r--r--src/crepe/system/InputSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crepe/system/InputSystem.cpp b/src/crepe/system/InputSystem.cpp
index 91c9c64..d9c97a3 100644
--- a/src/crepe/system/InputSystem.cpp
+++ b/src/crepe/system/InputSystem.cpp
@@ -216,8 +216,8 @@ 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
&& mouse_pos.y >= actual_pos.y - half_dimensions.y