• Advertisement

Archived

This topic is now archived and is closed to further replies.

Camera in D3D8

This topic is 6251 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I got a question about the camera in Direct3D8 I''m using D3DXMatrixLookAtLH( camera pos, point to look at, up vector) Now on to the questions 1. What is the up vector, is it as simple as it sounds, a vector pointing to where the "sky" is? 2. I tried to implement quake like controls where you can move forward and turn around, strafe etc. Walking forward and strafing works ok (now), but the tricky part seems to be looking up/down and turning around. So the question would be, how do they do it, do they move the camera, move the world, rotate the camera, rotate the world?

Share this post


Link to post
Share on other sites
Advertisement
your questions can best be answered with my camera code...check it out. it''s in the source for the landscape project I made. www.msu.edu/~furtwan1/projects.html near the bottom. the camera code is in camera.h and camera.cpp

rotating the camera, and the world are really the same thing. you really only need to use one matrix if you want, because they are all multiplyed together in the end. you could never use the view matrix, and just the projection, and world, or all three. the point is that nothing is special about the view/world matrix. SO if you want to have camera movement, you just rotate and translate everything in the opposite direction of the camera. usually you do this in the view matrix. Don''t use that D3DXLookAt funtion, or whatever it was.

Share this post


Link to post
Share on other sites
Thanks for the quick answer, but the url for pseudo.zip and landscapesource.zip didnt work for me, only the program.zip

Share this post


Link to post
Share on other sites

  • Advertisement