finds.dev

DavidArayan/ezy-slice

An open source mesh slicer framework for Unity3D Game Engine. Written in C#.

View on GitHub

★ 2,280C#MITupdated Aug 2023

// the take

A Unity3D C# library for slicing meshes in half with a plane, handling the cross-section geometry and UV/normal/tangent interpolation so the cut looks right instead of just clipped. Useful for anyone building fruit-ninja-style, destructible-object, or surgery-sim mechanics without writing their own computational geometry.

Zero external dependencies and a small, readable API surface — slicing is one extension method call (object.Slice(point, normal)) that returns a SlicedHull you can turn into GameObjects yourself. Uses sound, well-known algorithms (monotone chain for cross-section triangulation, barycentric coordinates for UV/normal/tangent interpolation) rather than something improvised. Supports custom TextureRegion mapping and direct material injection for the cross-section cap, which matters if you care about batching or texture atlases.

Only slices convex meshes — anything concave (most real game assets without manual convex decomposition) will slice incorrectly or not at all, which is a real limitation for a 'mesh slicer' and isn't hugely emphasized until you read the algorithm notes. No commits since mid-2023, so it predates several Unity LTS cycles (2022 LTS, Unity 6) and DOTS/Burst/Job System integration isn't there — slicing is CPU-bound and synchronous, which will hurt if you need to slice many or high-poly objects per frame. No handling shown for re-generating colliders, rigidbodies, or skinned meshes after a cut, so you're on your own for the physics/animation side of 'sliced object falls apart realistically.' Community support is thin (Gitter channel, no recent issue triage) so you'd be debugging convex-hull edge cases largely alone.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
2,280
Forks
269
Language
C#
License
MIT
Last commit
10 Aug 2023

// nearby

If ezy-slice isn't quite it.

All repos →