look_at() not aligning properly.

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

The zombie should be looking at the player

The look_at() function doesn’t appear to be functioning properly. It’s several degrees off.
Here’s the link to the image:

:bust_in_silhouette: Reply From: kidscancode

look_at() points the object’s local x axis at the target. This means that if your sprites are not aligned so that 0 degrees points to the right, you will not be aligned correctly. 0 degrees rotation is defined as pointing to the right, along the X axis.