Godot Version
4.2
Hi,
I’m very new to programming
I was playing with tween, since it is pretty cool way to make some animation.
Question 1 :
In the Godot Documentation, they create a new variable to create a new tween with the object method ‘‘create_tween()’’
Why do I need to create a variable, can’t I just write :
self.create_tween().tween_property(self, “position”, Vector2(500, 100), 1)
Instead of:
var tween = create_tween()
tween.tween_property(self, “position”, Vector2(600, 600), 5)
Question 2 :
I understand the difference between _ready() and _process()
If I create a tween in the _process() fonction, this code is working :
tween.tween_property(self, “position”, Vector2(500, 100), 1)
But this code is not, it only work in the _ready() fonction (with the .from method) :
tween.tween_property(self, “position”, Vector2(500, 100), 1).from(Vector2(100, 100))
Why the first line of code is working in _process, but not the second line of code ?
Thx a lot !