Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | rakkarage |
What is the difference between these two? Just where it gets and sets the initial and final values? Why would i use one over the other? Or these targeting functions do something different?
targeting_property
Animates property of object from the current value of the initial_val property of initial to final_val for duration seconds, delay seconds later.
interpolate_property
Animates property of object from initial_val to final_val for duration seconds, delay seconds later. Setting the initial value to null uses the current value of the property.
var t := Tween.new();
add_child(t)
t.interpolate_property(c, "position",
c.position, Vector2(c.position.x + 200, c.position.y), 3.333,
Tween.TRANS_LINEAR, Tween.EASE_OUT, 1)
t.start()
==
var t := Tween.new();
add_child(t)
t.targeting_property(c, "position", c, "position",
Vector2(c.position.x + 200, c.position.y), 3.333,
Tween.TRANS_LINEAR, Tween.EASE_OUT, 1)
t.start()
It is just so that I can pass in c, "position"
instead of c.position
?
Please and thanks.