[SOLVED] How can I bend / rotate Ray from the camera to the position of mouse?

I have successfully used “Hello Picking”.

In my application I have inputManager.setCursorVisible (true); used.

When I shoot, I shoot with new Ray (cam.getLocation (), cam.getDirection ()); So straight out of the camera.

How can I query the mouse position and window size? If the standard camera is 45 °, then I should be able to bend cam.getDirection () in the direction of the mouse …

Is there an example or contribution for this? Sorry, I couldn’t find anything about it.

1 Like

You may want to read the rest of the tutorial that covers exactly what you are asking:

Let us know if that still doesn’t make sense.

I am inattentive or blind …
“Picking Action Using Mouse Pointer”, now I see it …
I’ll try immediately …

Works: ingenious and so easy.
I’ve only just started, but I’m totally thrilled with this engine.