[gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Luo Hei <luo_hei@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Mon, 17 Mar 2008 15:59:30 -0500
Alan Wolfe escribió:
If this helps, another way to do it is think of it like this.
When you click on a point with the mouse, it covers up 1 pixel. What
is under the mouse could be near, or it could be far.
So, what you do is cast a ray that follows that path from where you
clicked the mouse into the scene, and find the closest intersection of
the ray to an object that you care about.
Yes, but what Im looking for is for some tutorial illustrating the
involved maths. So far I have found (I think, havent tested yet) how to
cast the ray from near to the far clip plane. How to determine if the
ray intersects some of the quads still escapes from my comprehension.
--
What one fool can do, another can.
Silvanus P. Thompson
______________________________________________
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Alan Wolfe
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Roman Hwang
- References:
- [gameprogrammer] screen to world coord conversion in OpenGL
- From: Luo Hei
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: richard sabbarton
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Alan Wolfe
Other related posts:
- » [gameprogrammer] screen to world coord conversion in OpenGL
- » [gameprogrammer] Re: screen to world coord conversion in OpenGL
- » [gameprogrammer] Re: screen to world coord conversion in OpenGL
- » [gameprogrammer] Re: screen to world coord conversion in OpenGL
- » [gameprogrammer] Re: screen to world coord conversion in OpenGL
- » [gameprogrammer] Re: screen to world coord conversion in OpenGL
If this helps, another way to do it is think of it like this. When you click on a point with the mouse, it covers up 1 pixel. What is under the mouse could be near, or it could be far. So, what you do is cast a ray that follows that path from where you clicked the mouse into the scene, and find the closest intersection of the ray to an object that you care about.
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Alan Wolfe
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Roman Hwang
- [gameprogrammer] screen to world coord conversion in OpenGL
- From: Luo Hei
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: richard sabbarton
- [gameprogrammer] Re: screen to world coord conversion in OpenGL
- From: Alan Wolfe