OnMouseDown() will tell me when an object is clicked. Is there a way to know which face of a cube was touched?
asked Nov 27 '10 at 02:35 AM
You'll need to cast a ray from the mouse position into the scene, and examine the RaycastHit result to check which triangle was hit. There are two triangles on each side of a cube, so you'll need to check for both triangles for each side.
You'll need to work out which indices relate to which sides, and group them accordingly in to "if" statements, like this:
0 and 1 might not be the top, I haven't tested this myself - this is just for illustration!
answered Nov 27 '10 at 08:32 AM