Hello, I have a problem that seems simple but I can’t find anything clear, because everything talks from model to model, but nothing from box or sphere to model or vice versa, it turns out that I have a box to which I put a model on top but the part of the model The crow goes into the box, revealing the surface of the box and not the part where there should be a space. I leave some screenshots to show the problem. I read something about CSG but I don’t think it suits what I want.

This picture is the model in the box, it is fully inserted

This image is the model out of the box, and how the space in the center should look.
I’m not sure what you want to do, but most likely you have to do it like you would do with objects in real life – make a hole in the box and insert the object in the hole.
You have to resolve two issues:
- how to cut the hole (possible options are to use CSG, or to make own geometry with a hole)
- how to calculate the size of the hole (possible options are each object to have data about the size of the hole, or to write a function that measures the object)
3 Likes
Thanks for the help, I will follow your advice and share a sandbox with the solution
This is very useful, it put me on the right track, I ended up using the three-bvh-csg library, and everything is fine, it even allows me to move the model on the surface that is inserted without losing the perforation made