Yeah, now it’s clearer So just an idea: use raycaster + CSG.
Using mouse and raycaster, you create kind of an irregular pyramid, whose “top” is at the position of the camera and “bottom” is far enough (further than position of the object + a half of the depth of the object).
You can get points of the “bottom” by finding intersection with
THREE.Plane() or using
raycaster.ray.at(). It’s up to you, but I’d prefer the first method with
Now, you have a set of vertices and you can build the pyramid. How you will do it, it’s up to you again.
When all is ready, use ThreeCSG to subtract the “pyramid” from the object.
That’s all Maybe the other users here have another ideas and will to share them.