Face detection

What is the best way to detect the faces of a cube, and then store these? So an object works out if each face is being touched.

I’ve considered doing multiple raycasts, but that probably won’t be great for performance. I also considered doing an OverlapSphere on every face, but that could get confusing in the hierachy with lots of objects? Also, they are quite expensive. So how would you do it?

Well, using OnCollision(), you can use the Collision info it supplies to return the triangles currently being touched. As long as you keep an index of which triangles are on each face (generally 2, I think?), you should be able to tell which faces are currently being collided with.

I’m not sure that’s less expensive than raycasting, however. It might be worth it to try both ways.