Rotation stops, how to continue rotating?


Upon player Horizontal input, I’m aiming to rotate player on one axis, y. This rotation works, but it stops rotating at a certain angle. Can someone please review my code and let me know if I’m approaching this incorrectly?

// C#
Quaternion rot = rigidbody.transform.rotation;
rot.Set(rot.x, rot.y + GetAxisH * turnSensitivity , rot.z, rot.w);

You should use Transform.Rotate if you do not intent to rotate the object by physics. Also, if you are applying this in a regular update (as opposed to a FixedUpdate) you should scale it by DeltaTime to ensure a constant speed.

function Update() {
    // Rotate around world Y axis
    transform.Rotate(Vector3.up * GetAxisH * turnSensitivity * Time.deltaTime, Space.World);