We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › Finding world-co-ordinates for on screen point
Page Index Toggle Pages: 1
Finding world-co-ordinates for on screen point (Read 507 times)
Finding world-co-ordinates for on screen point
Feb 19th, 2006, 9:18pm
 
Has anyone written any code to translate a screen point (x/y/z-buffer-value) into world co-ordinates? I had assumed that's what modelX/Y/Z did but it turns out they don't, so is there any other way to find out?

I do have one method but that requries me trying to work out how to create a vector from the camera position, to the plane of the screen, then to do an intersect test with every single polygon drawn on screen, which becomes unusably slow for any even slightly complex scene.

Basicly what I'm trying to do is draw a 3D scene, then draw an obect resting on the surface of another at the position that the mouse pointer on screen.
Page Index Toggle Pages: 1