I’ve done a little searching through here but I couldn’t find anything…
How do you handle pixel picking of a Texture on for example a billboard?
I’m trying not to have to turn my simple 2 poly ‘board’ into a whole bunch and do vertex picking.
I figure this info would be useful for anyone that wants to put a bullet hole on a wall as well.
Picking is basically collision detection: ray versus the scene. And currently collision detection is only bounding volume accurate. Although triangle accuracy (and then pixel accuracy) is planned.
Do you even understand the theory behind this?
I'm not sure if you are attacking me with this comment or not, so I'm going to pretend you aren't. :)
Current Picking in jME uses ray picking. which projects a ray from the point of the mouse click into the scene. Results are then generated as a list that can be sorted based on distance. (This is not pixel accurate yet).
You can also use DisplaySystem's getScreenCoordinates and getWorldCoordinates to translate mouse location into 3D space as well as translating your quad into 2D mode. Once you have the mouse and geometry in the same dimension, you can do your comparison.
Lastly, you could (as a temporary solution) call GLU.gluUnproject and use OpenGL's picking solution. This would require you to make direct LWJGL calls, so I would recommend this as a temporary solution.
Sorry, no insult intended AT ALL! ://
Thanks for your answer… I’ll work on it.