- Edited
Hi alls, with the following code, i can move an objekt smoofly by press and release a key...from start position, up and than back to startposition:
var position_in_rest = Vector3()
in:
func _ready():
i do restore the startposition:
position_in_rest.z = translation.z
and in:
func _physics_process(delta):
i have
if pressing_button == true:
motion = ((position_in_rest.z + 2.5) - self.translation.z) * 0.2
translate(Vector3(0,0,motion/4))
if pressing_button == false:
motion = ((position_in_rest.z) - self.translation.z) * 0.2
translate(Vector3(0,0,motion/4))
Now i try the same with an other object... but i only want to rotate it... and i cant find a way to do it :( by searching i didnt find what i need.
so do you have an idea?
Thank you Neo