Jump to content
  • Advertisement

Archived

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

Klaatu

Camera space

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

I''ve recently started to delve into Direct3D. I am converting an OpenGL app to DirectX. I have already run into a problem that has stumped me for the last week. I''ve either got a bug or a lack of basic understanding on camera space. Here''s what''s happening: I am trying to render an untranslated "point". The point is at (-0.568,0.465). I set the world matrix to be identity. The view matrix is set using D3DXMatrixLookAtLH(). I specify an eye point at (0,0,-5) and a look at pt at (0,0,0). The up vector is (0,1,0). When the "point" renders, it is displayed at (-0.568,-0.465). If I adjust the eye pt, I can get the point to move to (0.568,-0.465) but never to where I want it. Can anyone shed some light on this? TIA Gort...Klaatu, Barada Nikto!

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Direct3D uses a left-handed coordinate system. +Z goes into the screen, -Z comes out. Maybe that''s your problem?

<a href="http://www.evl.uic.edu/ralph/508S98/coordinates.html">http://www.evl.uic.edu/ralph/508S98/coordinates.html</a>

Share this post


Link to post
Share on other sites
An update:

I was able to resolve this problem. The problem was caused by a bug in the way the projection matrix was established. My advice - pay particular attention to how matrices are used and multiplied.

Gort...Klaatu, Barada Nikto!

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!