• Advertisement
Sign in to follow this  

Calculate ray from eye point to projection plane

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