Any idea why this turret won't target any enemies in the negative of the x axis?

    //calculate the point in space to fire a shot at
    private void CalculateAimPosition(Transform target)
    {
        //look at the enemy
        Quaternion diffRotation = Quaternion.LookRotation(transform.position - target.position, Vector3.up);
        turretBall.rotation = Quaternion.RotateTowards(transform.rotation, diffRotation, Time.deltaTime * 2000);
        turretBall.eulerAngles = new Vector3(0, 0, turretBall.eulerAngles.z);
    }

I ripped the code from somewhere else. Quaternions are incomprehensible. I have a 2D sprite turret that should face towards an enemy target. If the enemy is at a position in the positive range of the x axis it works no problem. However if the enemy is below zero on the x axis, the turret fires in the exact opposite direction. Any ideas?

EDIT: Actually the x and y axes are always flipped to what they should be, and turret is just firing sort of close sometimes and nowhere near other times? Ugh.

edit: on double checking which parameter it’s referring to… that would need the third parameter to be negative… so maybe not. But it does match what you are describing rather well.