+1 vote

Is it possible to tween global_position.x andglobal_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?

in Engine by (1,604 points)

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

1 Answer

+2 votes
Best answer

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

by (7,946 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.