I have a scene set up in a 3D viewport. The game is 2.5D, so for the most part, the game will be composed of sprites.Until I started using glRotated(0.15, 1, 0, 0); to rotate the entire view of the game, I had no problem getting the world location of the mouse. Now, obviously, the input methods I use for Mouse's X and Mouse's Y on the world need updating, or I need new methods.

So my question is, is there any method to getting the physical X, Y, and Z location of the mouse, taking in the input of the mouse's X and Y? If OpenGL doesn't support the mouse's location with drawn objects or anything like that, could anyone help me with the math?

I think what he/she means is that a X/Y position from the mouse on the screen can be many positions in 3D space - are you looking to project it onto an object? If so, you want to look up generating rays into the screen based on your current projection matrix and collide those with the shapes within your scene.

I think what he/she means is that a X/Y position from the mouse on the screen can be many positions in 3D space - are you looking to project it onto an object? If so, you want to look up generating rays into the screen based on your current projection matrix and collide those with the shapes within your scene.

Cheers,

Kev

Exactly this. Hrmm. So I assume OpenGL Utilities don't really support anythinwg like this, so I'll have to create it myself.I'm thinking about how I would create rays. Perhaps I should read up on it. It doesn't seem like the easiest task, especially taking into account Field of View, and rotation at 15 Degrees.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org