Is it possible to clamp rigidbody.MoveRotation? I followed the unity tank tutorial and I really like the controls but I would like to clamp moverotation 30 degrees left and right as I'm using it for tire rotation on a race car. I tried Mathf.Clamp but it didn't do anything. Any help will be appreciated.
I figured out how to clamp the tires float rotation = Input.GetAxis("Horizontal"); frontLeft.localEulerAngles = new Vector3(0, rotation * 30, 0); frontRight.localEulerAngles = new Vector3(0, rotation * 30, 0);