-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Is it possible to make a hole in a Plane? Unfortunately, the subtraction doesn't work properly in this case.
Is there a solution how I can get a hole in a Plane?
GameObject plane = GameObject.CreatePrimitive(PrimitiveType.Plane);
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
plane.transform.localScale = Vector3.one * 2;
CSG_Model result = Boolean.Subtract(plane, cube);
GameObject composite = new GameObject();
composite.AddComponent<MeshFilter>().sharedMesh = result.mesh;
composite.AddComponent<MeshRenderer>().sharedMaterials = result.materials.ToArray();
Destroy(plane);
Destroy(cube);
Metadata
Metadata
Assignees
Labels
No labels