top of page
  • justincragg

Mesh Slicing (Unity C#)

Updated: Nov 27, 2019

As a bit of a fun side project over the holiday I decided to look into mesh slicing. Little did I know it turned out to be more of a task than I first thought! It took a great deal of research as the majority of sources I found did not include specific instructions or formulas.

The slicer works by first checking how a plane attached to the blade hits the object. This information is used to determine which vertices of the object are on which side of the plane and are then grouped together and 're-stitched' into two cohesive objects. Which are then instantiated and voila! In the end I was able to get the slicing working really well except for more complicated objects where the new part of the object has too many vertices, however all in all I must say it is incredibly satisfying to cut things up!

4,762 views1 comment

Recent Posts

See All

1 Comment

John-Marc corneloup
John-Marc corneloup
Oct 04, 2023

How did you set up your colliders & rigidbodies for the cubes & the sword?

bottom of page