Hi, I'm trying to create a button that rotates my object perfectly 90 degrees to the left from it's initiate state.
I made a button that when it is triggered, it will execute the following code.
cam.reset(); // Resets the camera so that the object is in its initial state.
cam.rotateY(-PI/2); // cam.rotateX(-PI/2);
However, every time I press the button, cam.reset() will be executed but not rotateX(). And when I execute rotateX() by itself, it works. Hence, I think that it is the cam.reset() that nullifies the rotateX() that comes after it.
Does anyone know a way to prevent this from happening? Or does anyone know how to reset the 3d object to its initial position without using cam.reset()?
Thank you so much, Jerry