#Proper way to do simultaneous animations with tweens?

2 messages · Page 1 of 1 (latest)

vast sentinel
#

So I have a case where I want to do simultaneous animation with tweens and wondering if this is the best way to do so.

In this example, I want to scale the node but at the same time I want to move it up and down so I am using 2 tweens on on the node like this:

tween = get_tree().create_tween()
tween2 = get_tree().create_tween()

tween.tween_property(self, 'scale', Vector2.ONE * scale_factor, duration)
tween2.tween_property(self, 'position:y', position.y - 100, duration * 0.3)
tween2.tween_property(self, 'position:y', position.y + 150, duration * 0.7)

tween.tween_callback(remove)

Is there a way to do something like with with a single tween or is multiple like this the best way?

#

ignore the screenshot, that was part of a previous post I was going to make