Jump to content
  • Advertisement

Archived

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

wonyee

question about D3DXMatrixLookatLH

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

when i use D3DXMatrixLookatLH to produce the view matrix, i noticed that the LookAt point always locate in the middle of the window. everything is changing, but the LookAt Point just keep still, sitting in the middle. i want to make it sitting somewhere else, for example, the left-top point of the window. when the scene changed, the lookat point keep still sitting at the left-top point of the window. how to do it? thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
That''s because the pEye and pAt positions are used to compute your View direction vector (or VPN (View plane normal)). You always look the way your view vector points, towards the pAt in this case. D3D renders whatever you''re view vector is pointing at in the center of the render target.

Try rotating your world (or rather your view) with some angle and you shall get what you want.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!