Hello,
I would like, in a C# script, to rotate a cube by exactly 90 degrees when a specific
key is pressed. The code below works, but only rotates the cube by a small amount each
time the RIGHT ARROW key is pressed. Is there some functionality that would allow me to
rotate a specific number of degrees at once? Euler Angles perhaps? Thanks in advance!
void Update ()
{
if(Input.GetKeyDown (KeyCode.RightArrow))
{
transform.RotateAround(Vector3.zero, Vector3.up, 60 * Time.deltaTime);
}
}