public class Rotate : MonoBehaviour {
float speed = 30.0f;
private void Update()
{
float h = Input.GetAxis("Horizontal");
h = h * speed * Time.deltaTime;
transform.Rotate(Vector3.forward * h);
}
}
i want limit rotation Z of transform
help…