Collider Slicing
Scene Path: /Asset/Plugins/27 Slicer/Demos/5. Collider Slicing/Collider Slicing.unity
Introduction
This demo uses a ColliderSlicerComponent to slice mesh colliders
The couch and table shares the collider's mesh with their mesh filter and efficiently slices the mesh once and shares the result between both the collider and mesh filter.
The rug uses a simplified mesh for the collider that is not shared with its mesh filter and as such must be separately sliced.
The cardboard box uses three box colliders, these colliders are stretched by the slicer so they keep their correct proportions.
Example
In the video example below Edit Mode
of the Slicer Controller is toggled on and off. The scene is then started in play mode to test the colliders using a simple ball thrower.
Note
These demos are setup to only work with the Built-in Render Pipeline.
The lighting and materials will be incorrect if the demo is loaded into a project with a different render pipeline enabled.
27 Slicer is compatible with these renderers when properly setup. The Compatibility page has further information.
Credits
The assets used in these demos are by Kenney. Licensed under Public Domain CC0 1.0 Universal (CC0 1.0).