Making the camera in DirectX9
Posted: Fri Oct 08, 2010 4:13 pm
Hi everyone.
Help, who can, what control the camera (rotate, move, zoom).
There is only this:
P.S
If there is anyone examples, please lay out.
Help, who can, what control the camera (rotate, move, zoom).
There is only this:
Code: Select all
View.D3DMATRIX
CameraPoint.D3DXVector3
CameraPoint\x = 0
CameraPoint\y = 0
CameraPoint\z = 1100
LookAt.D3DXVector3
LookAt\x = 0
LookAt\y = 0
LookAt\z = 0
UpVector.D3DXVector3
UpVector\x = 0.0
UpVector\y = 1.0
UpVector\z = 0.0
D3DXMatrixLookAtLH(View, CameraPoint, LookAt, UpVector)
*D3DDevice\SetTransform(#D3DTS_VIEW, View)
Projection.D3DXMATRIX
D3DXMatrixPerspectiveFovLH(Projection, D3DXToRadian(45.0), (D_Width.l / D_Height.l), 0.1, 100000.0)
*D3DDevice\SetTransform(#D3DTS_PROJECTION, Projection)If there is anyone examples, please lay out.