godot on mouse click code example
Example 1: godot check left mouse button
if (event.is_pressed() and event.button_index == BUTTON_LEFT):
print("Wow, a left mouse click")
Example 2: godot mouse position
get_viewport().get_mouse_position()
if (event.is_pressed() and event.button_index == BUTTON_LEFT):
print("Wow, a left mouse click")
get_viewport().get_mouse_position()