How Would I Find Out if a Player can See a Certain Face of a Mesh?

Hey people! I’m making a game that is somewhat like a voxel game, except that the blocks are not on a 3D grid. They can be anywhere in the y axis. Now, if I want to optimize this game, how would I go about checking to see if a face of a block is visible to the player? Is the best way to just look through the list of 50-100 blocks to find one that would hide the face? Also, I cannot use raycasts because more than one object might make a face covered.


If I’m reading the correctly, the only reason for this problem is to determine whether or not to render a face?

Do you realize that the engine can do this for you? I highly suspect that Unity’s implementation of Occlusion Culling will outperform yours, (hit the link for set up details), especially because there is likely some overhead with enabling/disabling renderers manually, which the engine can internally optimize out.

You may be trying something more complex which you did not describe, but it looks like you’re trying to do Occlusion Culling, so use Unity’s implementation for maximum performance.