Fruit ninja based melee system

As in title i want to learn how to dothat system. I know it’s possible but i don’t know how to do that. If someone know how to do this pls help me.

Fruit ninja based melee system like the one in Severed?

Here’s a tut I found from a quick google search

It’s in Unity, but the logic can be transposed to any engine.