prevent godot hickup when click event goes against a wall
This commit is contained in:
parent
ad32dbe7e4
commit
a0aca5f7c2
|
|
@ -234,6 +234,7 @@ func _input(event:InputEvent):
|
||||||
|
|
||||||
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
|
if event.is_action_pressed("collect_memento_ui") or event.is_action_pressed("option_memento_ui"):
|
||||||
if focus_ray.is_colliding():
|
if focus_ray.is_colliding():
|
||||||
|
if focus_ray.get_collider().has_method("handle"):
|
||||||
focus_ray.get_collider().handle(event)
|
focus_ray.get_collider().handle(event)
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue