i have this function and Camera(); is executed in the Render Loop , g_fZDistance is a float and when 'd' is pressed on keyboard the float is =+ 2.0f , now why wont the camera move in on my device window

void Camera()
// Initialise our vectors
D3DXVECTOR3 vEyePt( 0.0f,0.0f, g_fZDistance );
D3DXVECTOR3 vLookatPt( 0.0f, 0.0f,0.0f);
D3DXVECTOR3 vUpVec( 0.0f, 1.0f , 0.0f );

// Get D3DX to fill in the matrix values
D3DXMatrixLookAtLH( &matView, &vEyePt, &vLookatPt, &vUpVec );
g_pDirect3DDevice->SetTransform( D3DTS_VIEW, &matView );


Re: Game Technologies: Graphics need help with D3DXMatrixLookAtLH,


You will have to calculate also the lookAtPt. The eye point is moving but the look at point remains at the 0,0,0 point so you will see always the 0.0.0 coordinate