If you have the mouse button bound to a action, you can use Input.is_action_pressed
and that will return true as long as the mouse button is held down. I did a quick test, and the following works for me, with Mouse_Action
having mouse button 0
as the only input bound, and with the code in _physics_process
:
if Input.is_action_pressed("Mouse_Action"):
print ("DOWN")
else:
print ("UP")