I am like many trying to create aeroplane style rotation. The ability to bank(roll) and then change the pitch of the craft, using the new Y axis which of course is no longer straight up
My original code is as follows
D3DXMatrixScaling(&matScale, bike.vScl.x, bike.vScl.y, bike.vScl.z); D3DXMatrixTranslation(&matWorld, bike.vLoc.x, bike.vLoc.y, bike.vLoc.z); D3DXMatrixRotationX( &matRotateX, bike.vR.x ); D3DXMatrixRotationY( &matRotateY, bike.vR.y ); D3DXMatrixRotationZ( &matRotateZ, bike.vR.z ); D3DXMatrixMultiply( &matWorld, &matWorld, &matScale); D3DXMatrixMultiply( &matTemp, &matRotateX, &matRotateY ); D3DXMatrixMultiply( &matTemp, &matRotateZ, &matTemp ); D3DXMatrixMultiply( &matWorld, &matTemp, &matWorld ); bike.setMatLocal(matWorld);
I have tried quite a few things, but many resources seem to focus on the 'camera'
i assume(hoping) i could just tranform the Y axis and it would all work quite happily.
If anybody could point me in the right direction (no pun intended) it would be appreciated.
Thanks.