Ok, so I followed the HelloMousePick tut,
The thing is, I want to know at what world co-ordinate the Ray hit the 'ground' or box object. I wonder if there is perhaps a method for this sort of thing?
The reason I ask is that I'm really quite confused by all this.
The code I have so far
// Get the position that the mouse is pointing to
screenPos.set(am.getHotSpotPosition().x, am.getHotSpotPosition().y);
// Get the world location of that X,Y value
Vector3f worldCoords = display.getWorldCoordinates(screenPos, 0);
Vector3f worldCoords2 = display.getWorldCoordinates(screenPos, 1);
// Create a ray starting from the camera, and going in the direction
// of the mouse's location
Ray mouseRay = new Ray(worldCoords, worldCoords2
.subtractLocal(worldCoords).normalizeLocal());
// Does the mouse's ray intersect the box's world bounds?
pr.clear();
scene.findPick(mouseRay, pr);
That was copied straight from the tut. How do I extract the location at which the ray hit the 'ground'?
Thanks and sorry for the newbness.