Navigation
API > API/Plugins > API/Plugins/ProceduralMeshComponent > API/Plugins/ProceduralMeshComponent/UKismetProceduralMeshLibrary
Description
Slice the ProceduralMeshComponent (including simple convex collision) using a plane. Optionally create 'cap' geometry.
| Name | SliceProceduralMesh |
| Type | function |
| Header File | /Engine/Plugins/Runtime/ProceduralMeshComponent/Source/ProceduralMeshComponent/Public/KismetProceduralMeshLibrary.h |
| Include Path | #include "KismetProceduralMeshLibrary.h" |
| Source | /Engine/Plugins/Runtime/ProceduralMeshComponent/Source/ProceduralMeshComponent/Private/KismetProceduralMeshLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Components|ProceduralMesh")
static void SliceProceduralMesh
(
UProceduralMeshComponent * InProcMesh,
FVector PlanePosition,
FVector PlaneNormal,
bool bCreateOtherHalf,
UProceduralMeshComponent *& OutOtherHalfProcMesh,
EProcMeshSliceCapOption CapOption,
UMaterialInterface * CapMaterial
)
Parameters
| Name | Remarks |
|---|---|
| InProcMesh | ProceduralMeshComponent to slice |
| PlanePosition | Point on the plane to use for slicing, in world space |
| PlaneNormal | Normal of plane used for slicing. Geometry on the positive side of the plane will be kept. |
| bCreateOtherHalf | If true, an additional ProceduralMeshComponent (OutOtherHalfProcMesh) will be created using the other half of the sliced geometry |
| OutOtherHalfProcMesh | If bCreateOtherHalf is set, this is the new component created. Its owner will be the same as the supplied InProcMesh. |
| CapOption | If and how to create 'cap' geometry on the slicing plane |
| CapMaterial | If creating a new section for the cap, assign this material to that section |