I have been using a custom input processing function that references the Input
singleton:
func input_processing():
if Input.is_action_pressed("right"):
...
I call this function in _physics_process()
before my physics code.
I could achieve the same effect using the virtual function _input(event)
. For example,
func _input(event):
if event.is_action_pressed("right"):
...
Is there an advantage to using _input(event)
over the custom function which references the Input
singleton?