0 votes

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?

in Engine by (171 points)

1 Answer

+1 vote

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()
by (3,201 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.