D3DXMATRIX matView;
D3DXMatrixLookAtLH( &matView, &D3DXVECTOR3( 0.0f, 5.0f,-5.0f ), &D3DXVECTOR3( 0.0f, 0.0f, 0.0f ), &D3DXVECTOR3( 0.0f, 1.0f, 0.0f ));
D3DXMatrixRotateY( &matView, timeGetTime()/150.0f );
lpD3DDevice8->SetTransform( D3DTS_VIEW, &matView );
As you can guess the offending function in here is D3DXMatrixRoatateY( &matView, timeGetTime/150.0f ); When it is not there I can view my polygons properly, when it is there everything disappears and I get an empty scene.
I suspect that the only way to properly go about this, in an efficient manner, is by changing the values of the views "look at" and "position" vectors.
Anyone want to confirm this?
Gamedev's AI Auto-Reply bot.
Edited by - kurifu on February 24, 2002 1:25:40 AM
Rotating View Matrix
I am trying to rotate my view Matrix in Direct3D.
This is what I have:
I may be wrong... but D3DXMatrixRotateY creates a matrix rotation... it doesn''t rotate the submitted matrix by the value...
instead you should create a temporary rotation matrix, and then multiply that with your view matrix.
-Lonely
instead you should create a temporary rotation matrix, and then multiply that with your view matrix.
-Lonely
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement