Change position of child from parent

Hi everyone!

I am new in Godot and I have question related with changing position of child in 3D Node. I have different cards and each time when user move mouse to card it need to move its position.

image_2024-05-23_154523900

Because I have different cards, card position need to be moved related from which card user chosen. So, how to receive information about node which user is chosen and change position of child element in it?

func _on_card_mouse_entered(extra_arg_0):
	extra_arg_0.position = Vector3(self.position.x,10,self.position.z)


func _on_card_mouse_exited(extra_arg_0):
	extra_arg_0.position = Vector3(self.position.x,-10,self.position.z)

move_child ( Node child_node, int to_index )

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.