Find out which side of a mesh i am looking at?

I need to figure out which side of a cube the player is looking at. Is there some function or well known method for this?

  • make a cube out of 6 planes
  • or add colliders on each side
  • or maybe compare dot products (?) of the hit faces’ normal and camera’s fwd vector (may not work well)
  • or add IDs to the cube’s faces - something somewhat similar discussed [here][1] briefly.

You can return the face ID like so:

Used it only once, long time ago - hopefully this still works. Afair, the Section Index == Element Index.