MD Package Technical & APi Documentation
MDM_MeshCut_Cutter
Namespace: MDPackage.Modifiers
A part of MDM_MeshCut modifier. Apply this component to any planar object that will represent a cut transform with upwards-cut-direction.
Read more here (Online documentation slide)
Public Methods
// Check if the current Mesh Cutter overlaps a specific object
public void HitObject()
Public Fields
public bool simpleCutter = true; // Shows less fields

public Color cutterColor = Color.cyan;
public LayerMask cutterLayerMask = ~0;
public QueryTriggerInteraction queryTriggerInteraction = QueryTriggerInteraction.Ignore;

// Complex cutter

public Vector2 cutterSize = new Vector2(2, 2);
[Range(4, 128)] public int cutterIterations = 8;
public bool showIterations = true;
Examples
The following paragraphs contain Mesh Cutter script used in a practical example - detect if the cutter hits a specific object.
using UnityEngine;
using MDPackage.Modifiers;

public class SampleScript : MonoBehaviour
{
// Assign an already existing cutter source
public MDM_MeshCut_Cutter cutterSource;
// Assign a targetn gameObject with collider that will be detected by cutter
public GameObject targetObject;

private void Update()
 {
  if (cutterSource.HitObject(targetObject))
   Debug.Log("Object is in the cutter!");
 }
}