extends MeshInstance

onready var camera : Camera = get_node("/root/Level/Camera")

func _physics_process(_delta):
	var position_2d = get_viewport().get_mouse_position()
	var drop_plane  = Plane(Vector3(0, 1, 0), 1)
	var position_3d = drop_plane.intersects_ray(
							 camera.project_ray_origin(position_2d),
							 camera.project_ray_normal(position_2d))
							
	translation = position_3d
