I have a Cube, Prism, Square-Pyramid, Cylinder, Hemisphere, etc. And I want them to have different number of logical faces and face names.
Cube: 6 faces ( Front, Right, Left, Back, Top, Bottom )
Prism: 5 faces ( Front, Right, Left, Back, Bottom )
Square-Pyramid: 5 faces ( Front, Right, Left, Back, Bottom )
Cylinder: 3 faces ( Top, Curve, Bottom )
Hemisphere: 2 faces ( Curve, Bottom )
And each of them can be rotated multiple times using quaternion. Even after rotation, when a face of any shape is hit by Raycaster, I want to get the real mesh face name. How can I achived this?
Keeping this in mind that, a single logical face (curve) can be formed by multiple (more than 50 triangular faces). And hardcoding these value is not a good approach for every shapes I have. I want a generic solution for any shapes that I have now, and any shapes that may come up in future.
Thanks in advance for helping me out.