How to properly configure the look_at function for use?

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

I have been trying to use the look_at function but so far failed with the AI looking in wrong directions like looking up and not even looking at the right target (or looking down). Please help me I need help! I’m using 3D.

You haven’t included any details so there’s no way to know what you’re doing wrong.

You pass look_at() a coordinate and it rotates the object to point in that direction. You haven’t even said if you’re in 2D or 3D. In 2D it points the object’s local +x at the target, while in 3D it points the object’s local -z.

kidscancode | 2020-05-18 22:56