Jump to content
  • Advertisement

Archived

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

Endurion

When D3DXMatrixLookAtLH == Identity?

This topic is 5201 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'm using a LookAt matrix to orientate my objects (yes, overly complicated), so i can tell my object "look at vector xyz" or look in direction xyz. I'm using D3DXMatrixLookAtLH for this and it works quite nice. Now one problem keeps arising in different projects. In the beginning i want to have the matrix set to identity. Now here's the question: Which parameters/vectors actually set LookAtLH to identity? Do they depend on the view matrix? Or other dependencies? With try and error i can always figure good settings, but those vary from project to project (with different view matrices). I'd like a foolproof method for setting those three vectors (pos,lookat,lookup) so that they don't translate/rotate/skew the object in any way. Can you help? [Edit:] Ok, i found a solution, obviously D3DXVECTOR3( 0, 0, 0 ) D3DXVECTOR3( 0, 0, 1 ) D3DXVECTOR3( 0, 1, 0 ) seem to do the thing i wanted. I'd still like to know if this is the one true solution or if there's a downfall to it. Many thanks in advance, Endurion [edited by - Endurion on April 23, 2004 4:33:15 AM]

Share this post


Link to post
Share on other sites
Advertisement
yep it's dat.

With a Left hand System, the +Z is pointing in direction through the screen, +Y up, +X left.

With a Right hand system, only the direction througth become -Z.

so an Identiy will be achieved with D3DXMatrixLookAtLH() with origin(0,0,0) lookat(0,0,1) lookup(0,1,0)
and with D3DXMatrixLookAtRH(), the lookat change to (0,0,-1)

[edited by - bjone on April 23, 2004 8:49:00 AM]

Share this post


Link to post
Share on other sites
i would say that a matrix transpose equals a matrix inverse ONLY when you''re talking about a 3x3 rotation matrix.

Share this post


Link to post
Share on other sites
quote:
Original post by bjone
i would say that a matrix transpose equals a matrix inverse ONLY when you''re talking about a 3x3 rotation matrix.


This is true for all symmetric matrices

Share this post


Link to post
Share on other sites
quote:
Original post by bjone
i would say that a matrix transpose equals a matrix inverse ONLY when you''re talking about a 3x3 rotation matrix.


Actually, I believe it''s also true for any matrices which contain only rotations and uniform scales.

I like pie.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!