I'm doing a game in Godot, and I created a simple move animation with AnimationPlayer that moves the node from position A to position B. The animation is two keyframes.
Now I want to change position B with code, how can I do it?
I was thinking something like this:
func moveTo(pos):
get_node("animation").get_animation("move").get_keyframe(1).set_pos(pos)
get_node("animation").play("move")