Jump to content
  • Advertisement

Archived

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

Darwishi

D3DXMatrixLookAtLH - I Will go nuts!

This topic is 5504 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 having som serius problems D3DMatrixLookAtLH... I just can''t set the view correctly, i have been trying to get the view correctly for 12 hours. All i want is to get the "map" in the center (rotated 45 degrees), and the view should be top-down...
mvarCameraLocation = MakeVec3(40, 40, 0)
mvarAngle = 45
mvarDistance = 4
mvarCameraTo.X = mvarCameraLocation.X - ((UnitCircle(mvarAngle).X) * mvarDistance)
mvarCameraTo.Y = mvarCameraLocation.Y - ((UnitCircle(mvarAngle).Y) * mvarDistance)
[/CODE]

And i draw Y=Y, X=X and not Y=Z.

Does anyone have a clue?   

Share this post


Link to post
Share on other sites
Advertisement
I''m not sure as I am a newbie DX programmer, but I think maybe the problem is that you are using angle measurements in degrees. Try and use radians instead it should work I guess.

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!