# Matrices

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

## Recommended Posts

This is really beginning to bug me. I have read several articles on matrices, yet I still do not understand them. I find it difficult to even get past the first paragraph without some confusion. I was hoping if someone here could point me towards a really good article explaining matrices (regarding Direct3D), clearly and thoroughly, or perhaps even explain it to me here? Thanks, luke

##### Share on other sites
There are lots of good references, so I can't think of any one in particular to recommend. Perhaps you could give an example of where you are stuck, or tell us what concept is proving to be difficult. Given that, you'll probably get some helpful answers.

##### Share on other sites
you’ve probably seen this on your travels but take a look again because it should tell you everything you need to know.

if not as jyk said please tell use what parts you having trouble with

##### Share on other sites
Well, I was stuck with, basically, everything about them, but after some more intensive reading, I'm finally starting to understand. Having said that, I'm still finding it extremely difficult to achieve what I'm trying to do.

I'm just trying to get the user to be able to move the camera from a first person perspective (basically, just move around like in an FPS). I'm using DirectX 8 in VB6. Any code in C++ would also be helpful (but preferably VB, naturally).
The keys I'm currently trying to map out are WASD to move back and forth, and the strafe left and right, with the arrow keys to look around.

##### Share on other sites
i guess you need a book about linear algebra and vector geometry.
Geometric Tools for Computer Graphics is full of what you want,but it is professional and may be hard ( anyway you must have it )

check nehe.gamedev.net for his matrices tutorial.

a simple matrices book is "Matrices" for shaum's series : this is a good and simple book about matrices.

hope this helps.

##### Share on other sites
Quote:
 Original post by eGameri guess you need a book about linear algebra and vector geometry.Geometric Tools for Computer Graphics is full of what you want,but it is professional and may be hard ( anyway you must have it )

umm... recommending that book to a beginner is not a good idea. That book is really complicated and fails to provide adequate explanation of practical information. That book is fine if you already understand the math and need a reference.

3D Math Primer by Dunn and Parberry

That is a very good book for beginners.

##### Share on other sites
From what i'v seen, luke88 doesn't even need to know matrices. Moving a camera in a scene with direct3d is really simple, In C++ it goes like this:

LPDIRECT3DDEVICE8 mydevice;...//when you want to change the camera settings:D3DXMATRIX cam;D3DXVECTOR3 vFromPt = D3DXVECTOR3(fromX, fromY, fromZ);D3DXVECTOR3 vLookatPt = D3DXVECTOR3(atX, atY, atZ);D3DXVECTOR3 vUpVec = D3DXVECTOR3(upX, upY, upZ);D3DXMatrixLookAtLH (&cam, &vFromPt, &vLookatPt, &vUpVec);mydevice->SetTransform (D3DTS_VIEW, &matView);

In 3D, Matrices are usually for doing all kinds of transormations to points and objects, and also the most usefull ones are already prepared for you: D3DXMATRIXROTATIONX/Y/Z, D3DXMATRIXTRANSLATION, D3DXMATRIXSCALATION which are matrices for moving, rotating and scaling objects. The only use of matrices here is to do complicated transformations like: mirroring, perspective and others.

##### Share on other sites
Well, you aren't going to get very far with 3d programming without understanding matrices.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 9
• 33
• 16
• 11
• 10
• ### Forum Statistics

• Total Topics
634122
• Total Posts
3015637
×