What is the correct way of pass the NodePath property for a Tween?

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

I new using Tweens end I have a RigidBody 2D and I want to move it to another position by using tweens so, I have

tween.interpolate_property(self, "Transform/Position", position, position+Vector2(12,0), 1.0, Tween.TRANS_SINE,Tween.EASE_IN)

tween.start()

but nothing happend. Some suggestion?

Isn’t the correct syntax this?

tween.interpolate_property(self, "position", position, position+Vector2(12,0), 1, Tween.TRANS_SINE,Tween.EASE_IN)

p7f | 2018-12-27 12:32

You can get the syntax easily by just going to the editor click on the node you want to animate using tween place ur mouse pointer on the name of the property you want to animate for a while a note will pop up with the name it can be just the name or something/name just input those in ur function and u are good to go

code | 2018-12-27 14:32

Yeah! It works, I did not realize that it changes the way of using it from godot 2 to 3. Thank you guys, you’re awesome.

robert:_elizalde | 2018-12-28 06:03

i’ll post as an answer then, so other see its solved. @code should also post it and then you select the one helped you more!

p7f | 2018-12-28 14:45

:bust_in_silhouette: Reply From: p7f

Isn’t the correct syntax this?

tween.interpolate_property(self, "position", position, position+Vector2(12,0), 1, Tween.TRANS_SINE,Tween.EASE_IN)