fix: PlayerInput only sends signals when not paused

This commit is contained in:
Sara Gerretsen 2026-06-28 17:04:23 +02:00
parent 4df9496b87
commit 41597c6fc4

View file

@ -58,6 +58,9 @@ void PlayerInput::_notification(int what) {
}
void PlayerInput::unhandled_input(Ref<InputEvent> const &event) {
if (get_tree()->is_paused()) {
return;
}
Input *input{ Input::get_singleton() };
if (event->is_action("move_left") || event->is_action("move_right") || event->is_action("move_forward") || event->is_action("move_back")) {
Vector2 state{