Jump to content
  • Advertisement


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


Next Problem :) D3DXVec3Project

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

Right ive got my HUD working ok - and set up my ships scanners and sensors. When I lock onto a ship I want to display a traget reticle around the target. So Im using my 2D overlay system to draw an Icon on the screen no problem - but im having trouble getting it to stay on the target. I get the view port , and various matrices (view, world , projection). I then Rotate the targets position by the inverse of my ships rotation and use D3DXVec3Project to project that vector into screen co-ords but my target reticle wanders over the screen with no relation to the targets position. There are coralations - if I rotate the reticle moves etc - but it just doesnt match up. Is my plan or transforming the targets position by the inverse of my rotation wrong? Is it something to do with transforming 3d coords into 2d? Or is it that I am using my 2d hud projection matrices ? Should I be using my 3d cameras viewport etc?

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!