Slicing Concave Mesh Into Half.
Demo video: https://www.youtube.com/watch?v=_yqTljJ0mW0&t=166s
- Slice convex, concave, and meshes with holes.
- Rigidbody slicing example scene
Download the files from here or the asset library and put the addons folder into your project.
In your script that you want to slice meshes, create the MeshSlicer node and add it to the scene tree.
var meshSlicer = MeshSlicer.new()
func _ready():
add_child(meshSlicer)
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.
var meshes = meshSlicer.slice_mesh(slice_transform:Transform3D,mesh:Mesh,cross_section_material:Material)