I am trying to implement a sort of drag&drop with 3d primitives in Dirct3D, in fact D3DX. The problem is that i'm not too good with 3d transformations, especially those regarding vewing and projection. The screen coordinates of the cursor do not help me. What I need is vector that has the origin in the camera and points towards the space position of the cursor. After that i can intersect it with the primitives and find out which one is under the cursor from the camera's perpsective. If you can help me build this vector I think I'll handle the rest.
So if you know how to localize the mouse cursor in 3d space, please reply. Thanks!