Slowly rotating KinematicBody

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By echinococcus
:warning: Old Version Published before Godot 3 was released.

Does anyone know how would I slowly rotate kinematicbody some direction in 3D ? For instance a kinematic body is moving in the direction I clicked, and I want it to rotate to point that direction.

:bust_in_silhouette: Reply From: rustyStriker

I assume all you need to do is to calculate the angles which it will need to turn towards the location you clicked at, and after that you can use the tween node to animate it over a specific amount of time or you can “make” that animation yourself using angular velocity for a specific velocity but varying time…

EDIT: btw for every angle you can calculate it by calculating the angle on the perpendicular plane( aka for angle on the Z axis you calculate on the XY plane and for the angle on the X axis you calculate on the YZ plane )