How to keep on getting a signal with unhandled input if the mouse is pressed down.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jujumumu

If I use func _unhandled_input for like shooting I need to tell if the mouse is held down or not, but the function only sends a signal if it is clicked or released.

:bust_in_silhouette: Reply From: markopolo

Afaik there is no built-in signal that triggers each (frame? physics tick?) when a button is being held down. However, you can easily check each frame or physics tick or whatever using Input.is_mouse_button_pressed(whatever_button_you_want).