示例#1
0
        public List <GameObject> CutObject(GameObject obj, bool destroyPrevious = false)
        {
            // represent the NDPlane in obj's reference frame
            Vector3 refUp = obj.transform.InverseTransformDirection(transform.up);
            Vector3 refPt = obj.transform.InverseTransformPoint(transform.position);

            plane.ComputePlane(refPt, refUp);

            prevCuts = MeshSlicer.CutObjectInstantiate(obj, plane, destroyPrevious);

            return(prevCuts);
        }
示例#2
0
        public void CutObject(GameObject obj, bool destroyPrevious = false)
        {
            plane.ComputePlane(transform.position, transform.up);

            MeshSlicer.CutObjectInstantiate(obj, plane, destroyPrevious);
        }