导入到Asset后引用: using EzySlice; SlicedHull hull = target.Slice(planePosition, planeNormal); 其中target是你想切的游戏对象,planePosition是作为切面的平面上的一个点,planeNormal是平面法线。这样就可以得到一个可切割对象hull。 然后再根据如下方法为切割后两个部分的hull分别创建切割后的GameObject GameObject upperHull = hull.CreateUpperHull(target); GameObject lowerHull = hull.CreateLowerHull(target); CreateSlicedComponent(upperHull); CreateSlicedComponent(lowerHull); 切割过程就完成了。
2022-06-17 14:09:57 21KB unity 游戏开发 游戏脚本 C#
ShatterToolkit是针对unity3d编写的一款粉碎模型的插件。里面包含切西瓜等例子。
2021-08-23 10:26:23 5.45MB 切物体 Unity
1