lookat rotation

Dear All,

Here is my turret head rotation:

Quaternion rotateto = Quaternion.FromToRotation(
     transform.localPosition.normalized,lookat.position-transform.position
);
transform.rotation = Quaternion.Slerp(
     transform.rotation,rotateto,Time.deltaTime*rotationSpeed
);

Everything works except that after 360 angle head makes 1 complete rotation along z axis.

What I have wrong?
Thank you in advance.

Hm, your first instruction looks weird. Try this instead:

Quaternion rotateto = Quaternion.LookRotation(
    lookat.position - transform.position
);

Thank you very much :), it fixed strange behaviour!