PiCode9560 / Godot-4-Concave-Mesh-Slicer

MIT License
134 stars 7 forks source link

Godot 4 concave mesh slicer

Slicing Concave Mesh Into Half.

Demo video: https://www.youtube.com/watch?v=_yqTljJ0mW0&t=166s

alt text

Feature

Installing

Download the files and put the ConcaveMeshSlicer.gd into your project.

Using

In your script that you want to slice meshes, create the MeshSlicer node.

var meshSlicer = MeshSlicer.new()

To slice a mesh, use the slice_mesh function.

#Slice a mesh in half using Transform3D as the local position and direction. Return an array of the sliced meshes.
#The cross-section material is positioned and rotated base on the Transform3D
meshSlicer.slice_mesh(slice_transform:Transform3D,mesh:Mesh,cross_section_material:Material)