C
Ich versuche gerade die Kamera zu bewegen, leider bewegt sie sich aber NICHT
.......
if(bKey[DIK_W])
{
TransZ = TransZ + 0.5f;
}
}
void Render_Rennen()
{
lp3DDevice->Clear(0,NULL,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0,0,0),1.0f,0);
lp3DDevice->Clear(0,NULL,D3DCLEAR_ZBUFFER,D3DCOLOR_XRGB(0,0,0),1.0f,0);
lp3DDevice->BeginScene();
D3DXMATRIX matrix;
D3DXMATRIX ViewMatrix;
D3DXMatrixLookAtLH(&ViewMatrix,
&D3DXVECTOR3( 0.0f, 0.0f,-10.0f ),
&D3DXVECTOR3( 0.0f, 0.0f, 0.0f ),
&D3DXVECTOR3( 0.0f, 1.0f, 0.0f ));
D3DXMatrixTranslation(&matrix,0.0f,0.0f,TransZ);
D3DXMatrixMultiply(&ViewMatrix,&ViewMatrix,&matrix);
lp3DDevice->SetTransform(D3DTS_VIEW,&ViewMatrix);
lp3DDevice->SetStreamSource(0,Road,0,sizeof(CustomVertex));
lp3DDevice->SetTexture(0,lpTexture5);
lp3DDevice->DrawPrimitive(D3DPT_TRIANGLELIST,0,2);
lp3DDevice->EndScene();
lp3DDevice->Present(NULL,NULL,NULL,NULL);
}