extends PanelContainer var track = false # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(_delta): if track: global_position = get_global_mouse_position() - Vector2(size.x / 2, size.y / 2) func _on_gui_input(event): if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT: if event.pressed: track = true else: track = false