prevent godot hickup when click event goes against a wall

This commit is contained in:
betalars 2025-09-05 01:56:49 +02:00
parent ad32dbe7e4
commit a0aca5f7c2
1 changed files with 3 additions and 2 deletions

View File

@ -234,8 +234,9 @@ func _input(event:InputEvent):
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
if focus_ray.is_colliding():
focus_ray.get_collider().handle(event)
get_viewport().set_input_as_handled()
if focus_ray.get_collider().has_method("handle"):
focus_ray.get_collider().handle(event)
get_viewport().set_input_as_handled()
if event.is_action_pressed("crouch"):
# Remember how long the key is held to tell apart toggle and hold behaviour.