Moving around a 3d scene
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
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement