Hello, when I do picking, how can I resolve click on transparent part of texture? So validate user click is on object behind. I have texture on quad. Thank you for help.
You can find the mouse position at the time of the click, so you know its position relative to the button clicked. You can then use the size of the button to find the UV coordinates. These can then give you the XY position on the texture when multiplied by the resolution.
Oh…sry! I misuderstood you…I doubt there is an easy sollution for your problem. I think in this case the easiest would be to “model the transpancy” if it is not too complex…
For that you can use the collisionmask. Default CollisionMask for Spatials is 1. So if you e.g.
do something like that
the transpNode will be ignored. (I have no jME around at the moment so I can't test it,...)
What do you mean "model the transpancy"?
I am able read texture and aplha bytes.
Next I need locate exact vertex of collision.
No vertex from quad coordinates but virtual collision vertex between ray and quad.
How can I obtain it?
Than I will be able locate point on texture and read alpha byte.
Or exists any easier way?