extends RigidBody2D
class_name Obstacle

@onready var original_parent = get_parent()

func grabbed(by):
	$shape.disabled = true
	can_sleep = true # this is needed to make the object sleep when grabbed
	sleeping = true
	gravity_scale = 0
	reparent(by)
	position.y = 0

func dropped():
	$shape.disabled = false
	gravity_scale = 1
	reparent(original_parent)
