   Mouse pointer in 3D space
  Hy!Is there a helper function in XNA that helps to convert the mouse pointer position from screen-space to 3D space, and maybe returns a ray pointing from the viewer's screen plane to the corresponding direction of the far clip plane? The method I used until now extracts the 6 planes from the view*projection matrix, determines the intersection points of the frustum planes and then interpolates between them using the position of the mouse pointer on the screen. I'was just wondering if there is a simpler method to do this in XNA (or D3D9,10,11).Thanks!   
Quote:Original post by CastorXHy!Is there a helper function in XNA that helps to convert the mouse pointer position from screen-space to 3D space, and maybe returns a ray pointing from the viewer's screen plane to the corresponding direction of the far clip plane? Yes, you can use GraphicsDevice.Viewport.Unproject()Here is a guide on how to use it: http://msdn.microsoft.com/en-us/library/bb203905.aspxAlso, a quick google for "xna picking" will give you more results and sample code. Hope that helps =);  That is very simple. Thank you! This is what I need. I did not really know what to search for in google.   