Jump to content
  • Advertisement
Sign in to follow this  
Xmon

Calculate ray from eye point to projection plane

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

How do I calculate the ray from eye point to pixel in projection plane best?

Share this post


Link to post
Share on other sites
Advertisement
You can go by using the built-in D3DX function D3DXVec3Unproject. It gives you world coordinates(your desired mouse position in world space) from screen coordinates(mouse position). Then simply construct your ray from world space mouse position and the eye position.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!