• Advertisement
Sign in to follow this  

Moving around a 3d scene

This topic is 4478 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

hey ppl ive just learnt about vertex buffers and matrices ive learnt how to create a cube and rotate it around its x,y and z axis ive position my camera using a d3dxvector3 {x,y,z) then in my code when the user presses up i make z = z+0.02 which should move the camera forword but because my lookat is at the origan it moves towords that way i just need a way to be able to move the camera forward backward rotate left and right thanx

Share this post


Link to post
Share on other sites
Advertisement
That has got to be the first time that I've seen a post that is just one long sentence. As a general tip - you'll get more responses by using better grammar and formatting in a post. If something is hard to read (I'm still out of breath) then they'll give up and go read someone elses thread instead [wink]

Anyway...

You need to learn how the view matrix operates. Manipulating the camera is typically just a case of vector mathematics with the results fed into D3DXMatrixLookAtLH().

If you're stuck on the basic vector maths, then you may wish to pick up a book on basic geometry and linear algebra.

hth
Jack

Share this post


Link to post
Share on other sites
Something you might want to look at is the set of tutorials that come with every DirectX SDK. They're pretty well done, and can teach you the basics of Direct3D in a matter of hours.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement