Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Omnipotent

Crash when z camera cordinate goes greater than -1

This topic is 5708 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey All, I am having a problem with d3d LH camera system, when I move the camera from point to anything greater than -1 the game will crash... I can set it manually in the code to anything I want and it compiles and works fine. It just keeps crashing every time I map controlling the z coordinates to keyboard buttons and goes greater than -1. Here is the code I am calling every Frame that updates the camera''a position, which seems to be causing the crash: // Move the camer along the z-axis if( m_bKey[''Z''] ) m_vFromPt.z++; if( m_bKey[''X''] ) m_vFromPt.z--; // Set the view matrix. D3DXMATRIX matView; D3DXVECTOR3 vLookatPt( 0.0f, 0.0f, 0.0f ); D3DXVECTOR3 vUpVec( 0.0f, 1.0f, 0.0f ); D3DXMatrixLookAtLH( &matView, &m_vFromPt, &vLookatPt, &vUpVec ); m_pd3dDevice->SetTransform( D3DTS_VIEW, &matView ); sprintf( strStatus, "Camera cords = (%f, %f, %f)", m_vFromPt.x, m_vFromPt.y, m_vFromPt.z );

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!