From 967b2be364bdabdf642c50d730d651b48801d1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Thu, 2 Apr 2026 14:58:38 -0300 Subject: [PATCH 1/2] HookControl: Disable keyboard aiming while mouse is in use Use a 3 seconds timeout to resume aiming with keyboard. This also happens to be the amount of seconds we keep the mouse cursor on screen in the MouseManager. This fixes an error in which the mouse and keyboard are competing for the aiming direction, making the grappling hook very hard to use. Credits for this feedback goes to Heather Drolet who complained about this in a playtest. --- .../props/hook_control/components/hook_control.gd | 9 +++++++-- .../game_elements/props/hook_control/hook_control.tscn | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scenes/game_elements/props/hook_control/components/hook_control.gd b/scenes/game_elements/props/hook_control/components/hook_control.gd index 499568da95..caaaf3161a 100644 --- a/scenes/game_elements/props/hook_control/components/hook_control.gd +++ b/scenes/game_elements/props/hook_control/components/hook_control.gd @@ -87,9 +87,12 @@ var _hook_angle: float ## diagonal directions when releasing the input actions. @onready var d_pad_timer: Timer = %DPadTimer +@onready var mouse_aiming_timer: Timer = %MouseAimingTimer + func _unhandled_input(_event: InputEvent) -> void: if _event is InputEventMouseMotion: + mouse_aiming_timer.start() var axis := get_global_mouse_position() - global_position if not axis.is_zero_approx(): _hook_angle = axis.angle() @@ -102,7 +105,8 @@ func _unhandled_input(_event: InputEvent) -> void: # there is always one that is released first so the aim direction ends up being either left or # down, not left AND down. if ( - _event is InputEventKey + mouse_aiming_timer.is_stopped() + and _event is InputEventKey and ( _event.is_action_released(&"aim_left") or _event.is_action_released(&"aim_right") @@ -113,7 +117,8 @@ func _unhandled_input(_event: InputEvent) -> void: d_pad_timer.start() return - _update_hook_angle() + if mouse_aiming_timer.is_stopped(): + _update_hook_angle() if Input.is_action_just_pressed(&"throw"): pressing_throw_action = true diff --git a/scenes/game_elements/props/hook_control/hook_control.tscn b/scenes/game_elements/props/hook_control/hook_control.tscn index 192ac3dd0c..6e9ca7f90c 100644 --- a/scenes/game_elements/props/hook_control/hook_control.tscn +++ b/scenes/game_elements/props/hook_control/hook_control.tscn @@ -22,4 +22,9 @@ unique_name_in_owner = true wait_time = 0.2 one_shot = true +[node name="MouseAimingTimer" type="Timer" parent="." unique_id=405211158] +unique_name_in_owner = true +wait_time = 3.0 +one_shot = true + [connection signal="timeout" from="DPadTimer" to="." method="_on_d_pad_timer_timeout"] From 4e7d30a6b5620f740a7899e260f4c6070ac7c0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Thu, 2 Apr 2026 15:02:08 -0300 Subject: [PATCH 2/2] MouseManager: Do not hardcode wait_time in code For hiding the mouse. The timer is already configured to wait 3 seconds. --- scenes/globals/mouse_manager/mouse_manager.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scenes/globals/mouse_manager/mouse_manager.gd b/scenes/globals/mouse_manager/mouse_manager.gd index 9fa46ff32a..956177e316 100644 --- a/scenes/globals/mouse_manager/mouse_manager.gd +++ b/scenes/globals/mouse_manager/mouse_manager.gd @@ -20,7 +20,7 @@ func _ready() -> void: func _input(event: InputEvent) -> void: if event is InputEventMouseMotion: Input.mouse_mode = Input.MOUSE_MODE_VISIBLE - hide_timer.start(3) + hide_timer.start() func _on_hide_timer_timeout() -> void: