How to move the camera view?

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

Hello all, I want to move the camera view to a certain point, like this:
enter image description here

Of the player to the spider, but dont move instantly, but smoothtly. How can I do that?

:bust_in_silhouette: Reply From: Magso

You can use lerp or a tween node.
Lerp

camera.translation = lerp(start_point, end_point, lerp_amount)
#camera.position for 2D
lerp_amount += speed

Tween

tween.interpolate_property(camera, "position" or "translation", start_point, end_point, speed, Tween.TRANS_LINEAR, Tween.EASE_IN_OUT)
tween.start()