Create a pick ray aimed using mouse screen data PickRay myRay = new PickRay( rayOrigin, rayDirection ); Initiate a pick starting at a Locale SceneGraphPath[ ] results = myLocale.pickAllSorted( myRay ); Get the first (closest) shape off the results Node pickedObject = results[0].getObject( );
PickRay myRay = new PickRay( rayOrigin, rayDirection );
SceneGraphPath[ ] results = myLocale.pickAllSorted( myRay );
Node pickedObject = results[0].getObject( );