Rotating a Cube
Okay, just a quick question here.
I'm working through a directx tutorial and I now know that you can make a rotating cube with this
And I've been tinkering with it, trying to make it rotate in two directions at once. Unfortunately there's no such function as D3DXMatrixRotationXY. No, that would be too easy. So what is the correct one? I tried putting a second rotation function after the first but the compiler only used the last one. I tried couching one inside the other like so:
// set the world transform
static float index = 0.0f; index+=0.03f;
No luck there either. But oddly enough that didn't give me any errors. Do I use D3DMatrixRotationAxis? I looked that up on the MSDN site but the syntax seemed confusing. Anyway, I appreciate any suggestions.
Note that this suffers from gimbal lock.