How to control 3D position of Spatial node with tween

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

I’ve tried to move the Camera to optional position in 3d with tween but I can’t do so.
I have Spatial node which has Camera node and Tween node as its child. I added a GDScript to this Spatial node and this is the code.

onready var my_camera = get_node(".")
onready var my_tween = get_node("Tween")

func _process(delta):
	my_tween.interpolate_property($".", "Translation(I don't understand how to write here)",Vector3(0,0, 0), Vecto3(100,100,100), delta,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
	my_tween.start()

Sorry for my bad English because I’m Japanese…

:bust_in_silhouette: Reply From: HIBIKI CUBE

I have solved the problem by myself. Here is the code.

onready var my_camera = get_node(".")
onready var my_tween = get_node("Tween")

func _process(delta):
    my_tween.interpolate_property($".","translation",my_camera.Transform.origin,Target_node.Transform.origin,delta,Tween.TRANS_LINEAR,Tween.EASE_IN_OUT)
    my_tween.start()

By using this code, you can move your Camera to your optional target smoothly.