| Nr | Tutorials |
|---|---|
| 1 | Creating a Knife |
| 2 | Make an Object Cuttable |
| 3 | Give an Object an Inner Material |
For this first choose a StaticMesh on which you want the SlicingLogic to be. In this example we use the SM_Knife_Table. Double click on it in the Content Browser to open the StaticMeshEditor for it.
In the top bottom should be a tab called Socket Manager. Press the button and add three sockets named BladeBox, Handle and CuttingExitpointBox. It should look like this:
From there on you can begin to place the tokens as needed in the StaticMeshEditor, e.g.
With that done you can save the StaticMesh in the StaticMeshEditor and leave it. All the StaticMeshComponents with that StaticMesh now all have these Sockets.
Now that the knife has the boxes, we can begin to spawn them inside the editor. First we select the StaticMeshComponent in the Editor.
Then on the top, in the same row as Play and Launch, there's the button called "Slicing Options", clicking on it reveals more options such as Debug Checkboxes. The important Button is "Replace Sockets on Selected Object".
After clicking it, it spawns the BoxComponents. If they don't appear at first simply click on something else and click on the knife again. It just needs to refresh.
The Knife is done. Result:
Optimal Positions of the Component
To make an object cuttable select one in the Viewport.
Just as in Step 2: Tag a StaticMeshComponent to a Knife we now add a tag called "Cuttable" into the Tag section. Refer to the mentioned Step above on how to do that.
The other thing to do is activating that our Selected Mesh is able to generate Ovelaps on it's own. For that simply go to the Collision section of your Selected StaticMeshComponent click on Generate Overlap Event.
Now that object is Cuttable.
To give an object a resistance on which the knife's progress through it is hindered, go to the tag section (under the Details view) and look for the two tags "Resistance" and the one directly below containing a numerical value (Default:"0"). Changing the latter to a value in between 0-100, from non-existent to full, changes the resistance.
For example, changing 0 to 100 will make it look like this...
You don't need to do this, as it will work even without changing these Tags.
To do so go to any Static Mesh, or your object, and select it with a left mouse click. After look to the Details view on the right and double click upon the Static Mesh.
After that you will find yourself, or at least a window opened, inside the Static Mesh Editor.
It will looks remotely like this
To create another slot, press the + Key. That will create another slot under your current one which you must rename to InsideCutMaterial. If you've done so you're able to select another Material in the appearing dropdown menu to use for the new planes created by the Knife.

If done correctly, it should look like this.
Top