Rotate on Command

Hello,

Working with your code only…

You are setting them to “original” position in your code in the “else” part of if statement.

Comment out all your else statements:

if(rotateU){
    //rotateX(angleX);
    angleX+=anglechgU;
  }
  //else{
  //  //anglechgU=0;
  //}

Move the rotateX() and rotate(Y) from the if statements to:

  rotateY(angleY);
  rotateX(angleX); 
  box(500);

Use a key like “r” to reset everything in a separate if statement.

:slight_smile:

1 Like