Godot Version
4.6.1.stable
Question
Hello! I’m trying to make my game character to move a body into the grave. I created a very simple script for testing but it is not working and I can not see what I am missing.
func _ready(): #This just declares where objects are at the start
$PlayerWorld.position = $PlayerPosition.position
$Grave.position = $GravePostition.position
$DeadBody.position = $BodyPosition.position
func _on_dead_body_area_entered(_area): #Here I connected a signal from the body which should update the position if the button is pressed. I don't understand why it doesn't.
if Input.is_action_just_pressed("interract"):
$DeadBody.position += Vector2(50, 0)
Thank you in advance for answering!