- Edited
Trying to use the function :
func _unhandled_input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT:
if event.pressed:
print("Left button was clicked at ", event.position)
else:
print("Left button was released")
if event.button_index == BUTTON_WHEEL_DOWN:
print("Wheel down")
but when I have a node attached to the mouse it doesn't work.
func _process(delta):
tile_build.position = get_global_mouse_position().snapped(snap)