0 votes

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?

asked May 13 in Engine by Diet Estus (933 points)
edited May 13 by Diet Estus

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.