Mouse picking

Ok, I have been looking for mouse picking in JME3, but found only tutorial for simple picking (always picks in the middle of the screen). How to extend this to pick where user clicked with a mouse on the screen (I don't really know where to get x,y coordinates of a mouse when user clicks)?

Create a mouse axis listener, store the mouse location when events occur and then check for the click like its done here in the scenecomposer of jMP:



Whoa, thanks for that… :slight_smile: