+1 vote

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.

in Engine by (429 points)

1 Answer

0 votes

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).

by (629 points)
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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.