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 & HelpSyntax Questions › Mouse position in 3d space
Page Index Toggle Pages: 1
Mouse position in 3d space (Read 354 times)
Mouse position in 3d space
Feb 26th, 2009, 2:20am
 
Hey all,
I'm working on a relatively simple game and have created a grid for positioning.  To get a perspective on it, I used the following on the camera position:
rotateX(-PI/7);
translate(-50,190,30);

Now, I've got this grid that looks like this:
http://groundhogmedia.ca/rich/file/grid.jpg

Each quadrant of the grid checks if the mouse is over it, but since the mouse position wasn't remapped, it's off by a bit.  
The question: how could I translate the mouse position so it would be in the same plane as the field?  
Thanks in advance!
Re: Mouse position in 3d space
Reply #1 - Feb 27th, 2009, 1:45pm
 
If you're using OpenGL, you might find some use in:

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=OpenGL;action=display;num=1176483247
Re: Mouse position in 3d space
Reply #2 - Feb 28th, 2009, 11:53pm
 
Hm, I'll have to take a good look through there...I'm having some problems with it but I'll keep playing.  Thanks again!
Page Index Toggle Pages: 1