Hi,
I moved the freezerotation = true inside the if statement and this feels more natural to me: (when not pressing a key the freezerotation is false)
private void RotateShip()
{
float rotation = rotationFactor * Time.deltaTime;
if (Input.GetKey(KeyCode.LeftArrow))
{
rb.freezeRotation = true; //take manual control over ship
//Debug.Log("The user pressed the left key");
transform.Rotate(Vector3.forward * rotation);
} else if (Input.GetKey(KeyCode.RightArrow))
{
rb.freezeRotation = true; //take manual control over ship
//Debug.Log("The user pressed the right key");
transform.Rotate(Vector3.back * rotation);
}
rb.freezeRotation = false; //give control back to physics engine
}