diff --git a/modules/viscosity/player_behaviour_tree.cpp b/modules/viscosity/player_behaviour_tree.cpp index 5d631457..d344011a 100644 --- a/modules/viscosity/player_behaviour_tree.cpp +++ b/modules/viscosity/player_behaviour_tree.cpp @@ -32,9 +32,10 @@ void PlayerBehaviourTree::_notification(int what) { void PlayerBehaviourTree::unhandled_input(Ref const &event) { if (event->is_action("move_left") || event->is_action("move_right")) { this->move_input.x = Input::get_singleton()->get_axis("move_left", "move_right"); - } - if (event->is_action("move_forward") || event->is_action("move_backward")) { + get_viewport()->set_input_as_handled(); + } else if (event->is_action("move_forward") || event->is_action("move_backward")) { this->move_input.y = Input::get_singleton()->get_axis("move_backward", "move_forward"); + get_viewport()->set_input_as_handled(); } }