A problem about screen space coordinate

Started by
-1 comments, last by iannan 19 years, 7 months ago
Hi I want to project screen space coordinate to 3D space coordinate. I use Pick of DX8 SDK to get the Dist value. Then I calculate the 3D space coordinate as: coordinate = Dist * pRayDir + pRayPos In my map scene 1, it works well. But if i change my scene, it doesn't work. (I do update view matrix, project matrix and world matrix when I change my map scene.) Is there any problem in my equation ? Or I should use D3DXVec3Unproject. If I use D3DXVec3Unproject, how to determine z value at 2nd parameter?? Thanks for reply. ps.Sorry, my english is not good, forgive me, please.

This topic is closed to new replies.

Advertisement