Is it possible to tween global_position.x and global_position.y separately?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Diet Estus

Is it possible to tween global_position.x and global_position.y separately?

I know I could do:

tween.interpolate_property(self, "global_position", position1, position2, 5, Tween.TRANS_LINEAR, Tween.TRANS_LINEAR)

But I would like to tween the x and y values separately.

Is it possible?

Never got the hang of tweening myself but what about lerp()?

flurick | 2018-11-13 10:32

:bust_in_silhouette: Reply From: eons

Yes, using : to point to the “sub” property
In this case, use global_position:x on the property name.parameter.