extends Button


@export var draggable: Draggable

func _on_button_down() -> void:
	var scene = draggable.scene_to_spawn.instantiate()
	get_tree().current_scene.add_child(scene)
	if scene is DraggableObject:
		scene.dragged = true
		scene.mouse_in = true
	var camera = get_viewport().get_camera_3d()
	scene.global_position = camera.plane_position
