struct MAGES::MeshDeformations::CuttableMesh::CutOptions

Overview

Cut process options. More…

struct CutOptions
{
    // fields

    string partPrefabPath;
    bool autoGenerateColliders;
    float seperationDistance;
    bool destroyOriginalAfterCut;
    bool generateCutFaces;
    Material cutFaceMaterial;
};

Detailed Documentation

Cut process options.

Fields

string partPrefabPath

The Path of the prefab to instantiate to attach the new meshes. Only used if Cut is called with handleMeshReconstruction enabled.

bool autoGenerateColliders

Try to generate mesh colliders for each cut part.

float seperationDistance

The distance to move the two parts appart so that the cut is visible. Does not work on skinned meshes.

bool destroyOriginalAfterCut

Should the original gameobject be destroyed after a cut is performed?

bool generateCutFaces

Generate faces in the place where the cut plane is. This will make the object not appear hollow.

Material cutFaceMaterial

The material to attach to the newly generated faces on the cut plane, if generateCutFaces is enabled.