Moving around a 3d scene

Started by
1 comment, last by Dorvo 18 years, 3 months ago
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
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.

This topic is closed to new replies.

Advertisement