How to detect which face of box user clicked?

Let’s say I have a Box object. I know I can “select” it using Ray object. But how to get info which exactly face of box user clicked? For convenience let’s name those faces face1, face2…face6. How do I get the info about which face of Box user has clicked?

Another thing is how I can know if user has clicked “corner” of face?

I need both things to develop my sandbox game which I think will be cool.

CollisionResult has a getTriangleIndex() method

Hm, thanks, will check that out.