how do you detect the overlap of two meshes

Is there a way to check how much (in percent) of a 3D mesh is within a different 3D mesh? If not, is there a way to see if two meshes overlap at all?

Have you looked into Colliders? MeshCollider specifically?

Can you explain what you’re trying to do? We might have suggestions.

I’m trying to create a 3d grid of invisible voxels all the same size. I want these voxels to appear when enough of a mesh surrounds them. This way I can have a character model that is in the voxel art style.

From your explanation i’m assuming you want to do something like, have an actual character model, check which coordinates it contains (or mostly contains), then enable these voxels, in order to have a sort of voxel-representation of your actual character 3D model?

First of all, let me say that voxel games do only appear to be made of several voxels (be it blocks or other voxel types). In reality each chunk is one single mesh with an underlying data representation, which you edit and then re-render, when a player for example destroys a part of the mesh. These games are not made up of hundreds or thousands of individual objects. So an approach where you enable or disable your voxels based on whether they are inside some mesh, is likely bound to run into performance issues - but that depends a bit on what exactly you are envisioning.

Well I was only planning on using this voxel enabling for the character, so that he could be procedurally animated in a voxel format, the rest of the game would likely use a mesh for the voxels, because like you said, it would be way to costly to do otherwise. Thanks for all the good advice!