set the range

Started by
2 comments, last by Chem 19 years, 6 months ago
hi all! I would like to ask sg. again: How can I set the range of a camera. Because if something is 'far' away from me, I can't see it because dx doesn't draw it. bye, lo.
Advertisement
ok :)
D3DXMatrixPerspectiveFovLH...
I searched it on the msdn. now it works.

bye, lo.
I suggest you look up the View and World Transformation in the directx documentation.

Your application should contain a call to D3DXMatrixLookAtLH, which specifies the eye point, the lookat point and the direction of up in your world (these are the 2nd, 3rd and 4th parameters).

So if you want to change the eye point, find the 2nd parameter (probably called vFromPt), and alter its x, y and z coordinates.
Yes, the D3DXMatrixPerspectiveFovLH specifies the near and far clip panes of the viewing fustrum. If you have a massive scene you want to keep the far clip pane relatively low or you may get some slowdown

This topic is closed to new replies.

Advertisement