Cutting Parts in Half

Just found out CSG was a thing lol

Took all day to make and needed pointers from my mentor :sob:

https://gyazo.com/bd5f3f2f3d897e5285a66736aaf7cdfe
Right now it’s nothing special but I’m going to turn it into a “skill” later, right now though, it cuts at any angle, the only problem at the moment is that it ignores size, so it’ll cut anything in half…
https://gyazo.com/e9b87b884bf80f7c9ffd544567b65e37

18 Likes

That looks amazing! It looks like it could be used for VR games like block saber

5 Likes

I was looking at more destructive uses but that’s a good idea :+1:

1 Like

Wow, it looks so great. And it’s so smooth, like a hot knife through butter!

1 Like

I added a very slight delay on purpose to give it that “hot knife through butter” feeling x)

Wow, that a brilliant idea, i imagine it in a vr game used to have saber to cut parts like Saber simulator. Good job !

1 Like

a sword fighting game with this could be awesome. how did you do it?

2 Likes

Used :SubtractAsync(), first I made a function that creates a part on one side of the part I used to represent the cut, the size and cframe is edited accordingly based on the part that it’s “cutting”, I’ll mention how I get that too later. The part is then put into a table that’ll be used to “subtract” from the part being cut, the original part is deleted and the union is parented. Then I scripted a function that’ll constantly check to get the touching parts using :GetTouchingParts(). You can think of it as a hitbox, so when it’s triggered it’ll get the touched part, I set up the functions arguments to take the hit part so I called it with a cloned part first then the original. The function returns the unions as well so I can add it to a table that is checked to prevent repeated cuts from the same blade (This doesn’t mean the union can’t be cut again :slightly_smiling_face:). At the end I added a wait() before unanchoring the parts and it got the smooth look it has now. :+1:

6 Likes

Looks great. I would love to see this implemented in things like Rogue Lineage and Anime games as some sort of skill. I always wondered if this was possible in ROBLOX and here it is. Keep up the good work. :grinning:

2 Likes

I’m gonna bookmark this… may be useful.

1 Like

Same. I this could make Fight games much interactives if you now can cut a tree in 2 (I mean, you understand, you cut the tree and it falls down). Only problem is that it uses CSG, and it isn‘t performance friendly… Hope Roblox will update this.

Glad to see that I am not the only person that didn‘t knew it.

Wait, one day to make a project like this? Well, you are a skilled developer.

If your careful when you use it and don’t go overboard you should in theory be fine.

2 Likes

Jeez! This is amazing! I’ve seen some pretty nifty stuff on this site, but I think this is one of the coolest things. (Right up there with cloth physics.)

1 Like

I’m going to commit the log out of you call Beat Saber like that. :joy: