Trying to animate a PanelContainer with a Tween in and out of screen (in this example between 0 and 200 y position), where going away is slow (5 sec) and going in fast (1 sec).
For some reason calling tween stop_all does not interrupt a currently running animation, as seen here https://imgur.com/a/9wlriIT. If the slow animation is interrupted it is resumed as soon as the fast animation is completed. Only after the slow animation is done can the quick animation complete and stay at the target position.
Scene structure and code (script of Node):
- - Label
onready var tween = get_node("Tween")
onready var node = get_node("PanelContainer")
onready var msg = get_node("PanelContainer/Label")
msg.text = "down"
msg.text = "up"
tween.interpolate_property(node, "rect_position:y", node.rect_position.y, 200, duration, Tween.TRANS_LINEAR, Tween.EASE_OUT)
var rect_position_y = 0
tween.interpolate_property(node, "rect_position:y", node.rect_position.y, rect_position_y, duration, Tween.TRANS_LINEAR, Tween.EASE_OUT)