Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Godot_Starter |
I want to print Hello, if the right mouse button is pressed
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Godot_Starter |
I want to print Hello, if the right mouse button is pressed
Reply From: | jgodfrey |
Here’s one way. Add this function to a scene script and run it:
func _input(event):
if event is InputEventMouseButton \
and event.button_index == BUTTON_RIGHT \
and event.pressed:
print("Hello")