D3DX, rotating object on both z and y axis?
Hey I'm trying to spin my object on both y and z axis.
Like I don't care what axis i am rotating my object, im just trying to rotate 2 axis's at a time.
this is the code that rotates on a z axis.
D3DXMATRIXA16 matWorld;
D3DXMatrixRotationZ( &matWorld, fAngle );
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
But how do i get it to rotate on both z and y, i tried the code below but it only rotates on the x axis.
D3DXMATRIXA16 matWorld;
D3DXMatrixRotationZ( &matWorld, fAngle );
D3DXMatrixRotationX( &matWorld, fAngle );
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
Whats wrong?