What is the nodepath of Control's rect_position ? [SOLVED]

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

There’s a control that I want to move using tween, but control are using rect_position instead of position so I tried to set the nodepath to “rect/position” or “position” which both of them are not working.
if I use the “rect:position” I got an error that said :

Condition !prop_valid is true, return false

Am I correct using rect_position as tween property to move a control? or is there another way? thank you for reading.

:bust_in_silhouette: Reply From: Zylann

Isn’t it just rect_position?

This works:

var tween = Tween.new()
add_child(tween)

tween.interpolate_property( \
	$Panel, "rect_position", \
	Vector2(100,100), Vector2(300,200), 1.0, \
	Tween.TRANS_QUAD, Tween.EASE_IN)

tween.start()

Hint: you can check this by moving your mouse over the name of the property in the inspector, it will appear as a tooltip.

thank you, I didn’t realize the tooltip :smiley:

asetyowatir | 2018-03-09 14:16