See Also
Methods on the Node class
See Node docs
_input(event: InputEvent)
See docs
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
NOTE: This method is only called if:
- the node is present in the scene tree (it’s not an orphan)
- if input processing is enabled (can be toggled with set_process_input)
- the input has not been consumed by a prior node
- To consume the input event and stop it propagating further to other nodes, Viewport.set_input_as_handled can be called.
- For gameplay input, _unhandled_input and _unhandled_key_input are usually a better fit as they allow the GUI to intercept the events first.