   Transform screen to XZ coords
  HiI have a 2D point wich I receive from a mouseclick. I would like to find out what coordinates in the XZ-plane (Y is always zero) this relates to, but I just cannot figure the math..Has anybody done this before, or know some resources you can point me to ? 
  You need to give more information.  Is the view rotated (what direction does the camera point)?  Is the camera translated?  Is the camera''s height variable?  If not, what is camera''s height?  Wwhat projection method are you using?  Do you manually calculate the screen coordinates of points from world coordinates, or do you use DirectX or somesuch?  What is the view''s angular width (how far on either side and up / down of your view direction do you see / what is the shape of the visible volume)? ;  Hi, and thanks for replyingI use DirectX for the transformations and drawing, but I thought to use my regular classes for this math. I''ve now figured out how to create a ray (with a pos and direction) from the camera, and created code to check for intersection with the XZ-plane. If this works like it did in testing, I guess the next step would be to rotate the ''camera ray'' according to the mouse position (ex 0,0 would be -30, -30 degrees if the viewpoint is 60 degrees). Not sure if this works, yet. Grateful for any comments or suggestions. ;  well there is well documented way of doing this.. i forget exactly how you do it.. im sure someone here has the formula for figuring this out. im at college atm so i dont have access to it.. but if memory serves me there is a tutorial on it at gametutorials.com, its in the opengl section if it is there...but your on the right track, change the screen coord to a ray from the camera and make sure its in world space then you shouldnt have any problem.. also the formula is for an arbitrary plane so it quite useful to know  [edit]http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg3.htmtheres the addy for the tutorial i mentioned..its for a line segment and a plane but its pretty easy to use it for a ray/plane intersection[/edit]Get busy livin' or get busy dyin'... - Shawshank RedemptionAltered Vision [edited by - syrillix on August 4, 2003 4:26:44 AM]