0 votes

Hello. Please, help me. How to smoothly rotate a Spatial by 45 degrees Y axis with a single press of a key? I'm trying to make a camera like in this video:

Thank you in advance!

in Engine by (27 points)

1 Answer

+1 vote
Best answer

On a project I have used a Spatial as pivot following the target and a camera (child) looking at it, then I just rotate the pivot when I need, the result was similar to the SmoothFollow script of Unity but just with nearly zero code.

But I think the best option could be to use spherical interpolation and quaternions to avoid problems.

Check this Codetuto post about 3D rotation basics in Godot

by (7,934 points)
selected by
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 Frequently asked questions and 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 [email protected] with your username.