![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | i dont like |
i am trying to make a tween that moves a door up by 5, but because i have to reuse the script i need to make the tween relative to the coordinates of the door
extends StaticBody
var pressed : bool = false
func _on_button_detection_area_entered(area):
$open.interpolate_property(
self,
"position",
Translation,
Translation() + Vector3(0,5,0), <<<<<<<<<<<<<<here
1,
Tween.TRANS_LINEAR,
Tween.EASE_OUT,
0)
im attempting to use the translation and add a vector3 to it, but this appears to be not what im supposed to do as i get an error saying that the method Translation is not declared in the current class (the arrows arent actually in the code its to point it out)
if someone knows how to do math for a vector3 to make it relative to the object, please help