how to limit when object rotate
var arm : Transform;
..
if(Input.GetKeyDown(KeyCode.B))
arm.Rotate (0, 0, 6);
if object rotate at z axis 90 degrees stop?
how to limit when object rotate
var arm : Transform;
..
if(Input.GetKeyDown(KeyCode.B))
arm.Rotate (0, 0, 6);
if object rotate at z axis 90 degrees stop?
Add a check to see if the rotation is less than 90 degrees before you rotate.
if(Input.GetKeyDown(KeyCode.B) && arm.eulerAngles.z <90)
arm.Rotate (0, 0, 6);