private void FixedUpdate()
{
if(startRotating)
{
transform.rotation = Quaternion.RotateTowards(transform.rotation,
Quaternion.LookRotation(camfreelook.transform.position - transform.position),
rotationSpeed * Time.deltaTime);
}
}
The problem is that the transform rotate also on the X and i want it to be rotating only on the Y.