Camera LookAt Help

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

Hi, I’m working on a script that moves the camera from point A to point B, looking at a particular Vector3 point in space. I’m going nuts trying to use the look_at function. Can someone please direct me to a simple tutorial or provide some idea on how to make my camera look at a particular point in 3d space using the look_at function or some workaround for this? Ive done this before in other platforms but for some reason I can’t seem to get this done in gdscript. I’m on 3.1.1 in OSX. Thanks for any help!

:bust_in_silhouette: Reply From: omggomb

$Camera.look_at_from_position(<newpositionspatial>.transform.origin, <lookattargetspatial>.transform.origin, Vector3.UP) should do the trick. If it doesn’t please post the relevant code.