hi everyone
my question:
i have 2 objects and this two shape starting collide, this 2 object not have rigidbody.
i want calculate how much nested this two object, like attached image:

hi everyone
my question:
i have 2 objects and this two shape starting collide, this 2 object not have rigidbody.
i want calculate how much nested this two object, like attached image:

Sorry for the late response ^^. I currently have about 150 UnityAnswers tabs open.
Well as i said having arbitrary meshes makes it way more complicated. Especially since the right “red” object is not convex. If you only deal with convex objects it’s easier. So if you really need the general case there is one initial requirement: the meshes need to be closed otherwise the concept of “inside” and “outside” makes no sense. So if you have two arbitrary closed meshes you have to do;
If you have problems with the implementation, here’s my VisPortal demo. You can use the Polygon class inside PolyArea.cs to represent a single “face” / triangle of your mesh. It has a clipping method to clip it against some clipping planes. The great thing about convex meshes is that when you intersect all border planes with each other you get the exact faces of the mesh.
As i said this is not going to be easy. This is actually the same what is needed for calculating CSG operations on meshes.