I tried to get the mouse data in
func _input(ev):
with
if (ev.type == InputEvent.MOUSE_BUTTON and ev.button_index == BUTTON_LEFT and ev.pressed):
but as soon as the mouse is over the application window the app freezes and the Debugger says
'Invalid get index 'type' (on base: 'InputEventMouseMotion').'
So then I tried in
func _fixed_process(delta):
to use
if Input.is_mouse_button_pressed(BUTTON_LEFT):
and
mouse_xy = get_viewport().get_mouse_pos()
but the Debugger says
'Invalid call. Nonexistent function 'get_mouse_pos' in base 'Viewport'.'
So I don't know what to do. Thanks for any suggestions.