I'm trying to make my own camera like DBPro's cameras, but i don't think i'm doing it right. I know, what's the point of trying to make your own if you already have the Built in once? well, i wanted to see if locking an object to the camera, will also affect my custom camera or if it's just the way DirectX works. here is my code
void CreateExtraCamera()
{
D3DXVECTOR3 CamPos(0,0,0);
D3DXVECTOR3 CamLook(0,0,0);
D3DXVECTOR3 UpDir(0,1.0,0);
D3DXMATRIX MatView;
D3DXMATRIX MatProj;
D3DXMatrixLookAtLH(&MatView,&CamPos, &CamLook, &UpDir);
dbGetDirect3DDevice()->SetTransform(D3DTS_VIEW,&MatView);
D3DXMatrixPerspectiveFovLH(&MatProj,45.0,1.333,1.0,100000.0);
dbGetDirect3DDevice()->SetTransform(D3DTS_PROJECTION,&MatProj);
LPDIRECT3DSURFACE9 RenderTarget;
/*dbGetDirect3DDevice()->CreateRenderTarget(
100,
100,
D3DFMT_X8R8G8B8,
D3DMULTISAMPLE_NONE,
0,
false,
&RenderTarget,
NULL);
dbGetDirect3DDevice()->SetRenderTarget(0,RenderTarget);*/
dbGetDirect3DDevice()->BeginScene();
dbGetDirect3DDevice()->EndScene();
RECT Rect;
SetRect(&Rect, 10,10,100,100);
dbGetDirect3DDevice()->Present(NULL,&Rect,NULL,NULL);
}
thank you for any advice and support
"Originally I was going to have a BS on it but you know how that would be. I can't walk around with the letters BS on me." More or less a qoute by Syndrome from Jack, Jack, attack