equivalent of 2d look_at in 3d

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

I want to rotate my player with something similar to look_at but in 3d.
also is possible with this look_at version in 3d is there a way to make it use lerp_angle with it?
If you can help thank you!

:bust_in_silhouette: Reply From: heavyathan

Look_at is a void function, so cannot be lerp.
But in the other hand, you have looking_at, which return a transform.
So, the equivalent should be:

var transf = global_transform.looking_at(target, Vector3.UP)
global_transform = global_transform.interpolate_with(transf, ACEL*delta)
1 Like