Camera Interpolation - How to globally interpolate between different rotations?

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

I’m trying to create a camera interpolation script that can smooth between multiple camera angles (camera angles are Node3Ds I placed in the scene)

I’m noticing that the rotations for objects NOT IN THE SAME PARENT get seemingly random results.

    temp = Transform;
	temp.basis = new Basis(startPos.Transform.basis.GetRotationQuaternion().Normalized().Slerp(endNode.Basis.GetRotationQuaternion().Normalized(), t));
	Transform = temp;

How can I globally lerp a rotation?

:bust_in_silhouette: Reply From: magicalogic

I suggest you look at the camera script in this simple addon. It shows very well how to interpolate rotation and also position of a camera in 3d space.
https://godotengine.org/asset-library/asset/739

Just extract it and look for the camera script. You can also just use the addon as is if that’s what you are looking for.