Calculate ray from eye point to projection plane

Started by
0 comments, last by MePHyst0 17 years, 10 months ago
How do I calculate the ray from eye point to pixel in projection plane best?
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.

This topic is closed to new replies.

Advertisement