diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-06 10:50:01 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2025-01-06 10:50:01 +0100 |
commit | 92dfde9a56f5a607269e8908002a72bec85357bd (patch) | |
tree | 16283391b01f2cc4e59c326377ec2dbf605d3540 /src | |
parent | cf6ca6be5a9deac4de921f50d0aedf6a6156e0f4 (diff) |
bug fix
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/system/InputSystem.cpp | 4 |
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 |