You almost figured it out. Put an Area2D
at the corner of the level and create a script for it. Hook up the Area2D
's body_entered
signal to that script. When a body enters it, change the body's position to the desired position with:
func _on_Area2D_body_entered(body):
body.position = Vector2(500, 50)