Is there a way to rotate an object along a different plane? I am making a 3D model of the solar system, and I'd like to get Pluto to revolve around the sun on a different plane to that of the other planets. I currently have the first eight planets revolving around the sun in the xz plane(rotation about the y-axis). Is there an easy way to do this without getting into complex math? This is how I've implemented my other planets,
D3DXMATRIX marsMat;
D3DXMATRIX marsScale;
D3DXMATRIX marsTrans;
D3DXMATRIX marsAxisRot;
D3DXMATRIX marsRot;
D3DXMatrixScaling(&marsScale,0.45,0.45,0.45);
D3DXMatrixRotationY(&marsAxisRot,D3DXToRadian((GetTickCount()-start)*0.07));
D3DXMatrixTranslation(&marsTrans,-17,0,0);
D3DXMatrixRotationY(&marsRot,D3DXToRadian((GetTickCount()-start)*0.007));
marsMat = marsScale * marsAxisRot * marsTrans * marsRot;
matrixStack->Push();
{
matrixStack->MultMatrixLocal(&marsMat);
d3ddev->SetTransform(D3DTS_WORLD,matrixStack->GetTop());
marsMesh->DrawSubset(0);
}
matrixStack->Pop();