This is in 3D, just to clarify.<br /><br />
<br />look_at(target.get_translation(), Vector3(0,1,0))<br />look_at_from_pos(get_translation(), target.get_translation(), Vector3(0,1,0))<br />
<br /><br />Using either of these causes the NPC to look at the target, but getting close causes weird rotations. I only want it to rotate on the y axis.<br /><br />
<br />var newrot = get_transform().looking_at(target.get_translation(), Vector3(0,.1,0)).basis.get_euler()<br />set_rotation_deg(Vector3(0,rad2deg(newrot[1]),0))<br />
<br /><br />These two, together, causes the NPC to veer away from the target when it starts getting close.<br /><br />I'm using them in the fixed_process.