r/Unity3D•
milotoad

How would I cut geometry in real-time?

Ok lets say I had a piece of rectangular wood. What if I wanted to use an axe to cut the one piece into two parts at any place in the geometry into two semi-equal parts? Is there an easy way to accomplish this?

Posted Dec 11, 2014, 8:34 PM UTC

42
GMTDev•

Go on the asset store and search for "Object Cutter". Pick one and download it. Look at the source code, figure out how it works, write your own.

5
mrbaggins•

Find the collision of the plane with the box.

create Two new mesh objects. Use the bottom vertices + the new ones to make one mesh. Use the top vertices with the new ones to make the other.

The math isn't ridiculous, but it's not "simple" either. Only works on basic polygonal shapes though.

4