Part fracturing system V3

Can’t really do due to how the system works, and the fact that my scripting skill is pretty limited.

I’ll need to learn how to divide wedges into more wedges if you wan’t that to be a thing.

You can easily add that on yourself

Thanks for your feedback! :+1:

1 Like

Update V2

This is just a small update that consists of improvements for the system and the thread itself.

Additions:

  • The debri/shards will now keep their velocity.

Improvements:

  • Optimized the system a bit.

Side notes:

  • The thread for this system has been updated as well. Such as adding the source code on the thread as @LuaBearyGood suggested
5 Likes

This looks very cool but how would this go for fracture effects on walls or wooden barricades?

One of my games is in need to replacing it’s fracture system based on several small anchored parts and could really use a system like yours.

What I am trying to understand is how I can make your fracture system work in away based on caliber, multiple hits before breaking and for example instead of fracture having actual bullet holes based on small caliber guns.

1 Like

Not really sure what your asking here.

on large walls, you’ll get big wedges. But if you wait till V3, the wedges from the fractured parts will break into smaller pieces as well, so you get more debris/rubble.

I haven’t tested fracturing on planks. I imagine it would like quite nice actaully.

You can achieve that by giving the object like a hit points value. And shooting it will take 1 away from that value. And if the value is 0 or below, you can run the fracture function.

And if you look at one of examples that uses the balls, you’ll see that they move the breaking point to where the ball hits. So if you want, you can do that to your gun as well.

2 Likes

Update V3

This is just a small update that consists of sound support, and a new weld debris value for the system

Additions:

  • Sound support
  • Weld debris option (bool)

Improvements:

  • N/A

Side notes:

  • The thread for this system has been updated a bit
8 Likes

Very nice! I made a system that works using the exact same principles a while back.

1 Like

the next gen roblox rocket launcher is coming soon…

Other than that, it looks AWESOME!

1 Like

Are you able to set how many shards there can be. Because maybe I want more debris. 0-0

1 Like

no, but i have tried adding this feature. More debris makes more triangles which causes lag, and removes the ‘shatter’ illusion.

2 Likes

Ah ok. Also I do expect more lag. I think what I was thinking was from you breaking the wall. Realistically there would be maybe a few more shards depending on it’s density. Thanks off answering.

3 Likes

You could try to make “more triangles” anchored once they stopped moving, it makes not struggle to run.

Or if it didnt work, you could make complicated / basic raycasting + applying animation to make it seem like it’s falls by hit position from ray caster, it uses tweening and doesnt require physics.

2 Likes

This is really fun to play around with, it’s well done.

https://gyazo.com/a619e0453ccd5613632747fd6bd24e96

1 Like

So im using this system right now but theres a bug. you can see what it is in the vid below
https://streamable.com/qjqjgc
heres my script

local Module = require(script:WaitForChild("PartFractureModule"))
script.Parent.BreakGlass.OnServerEvent:Connect(function(player, position, hit, rotate)
	local attach = Instance.new("Attachment")
	attach.Parent = hit
	attach.Name = "BreakingPoint"
	attach.Visible = true
	wait(1)
	local BreakingPoint = hit:FindFirstChild("BreakingPoint")
	if BreakingPoint and BreakingPoint:IsA("Attachment") then
		BreakingPoint.Position = Vector3.new(BreakingPoint.Position.X, BreakingPoint.Position.Y, BreakingPoint.Position.Z) 
		Module.FracturePart(hit)
		print(BreakingPoint.WorldPosition)
		print(position)
	end
end)
3 Likes

Oh, this system currently only works on one axis. There’s nothing wrong with your script.

Currently parts will have to be sized like so
(XThickness, YHeight, ZWidth)

your part’s face has to be the X axis. (I know it should be Z, but that’s just what I chose at the time.)

Oh ok thanks for telling me that !

1 Like

Is there any way to make it work on all axis?

Unless you redo the entire system, no. This is just a simple 2D fracture system. Doing a 3D fracture system would be very complicated.

Complicated, but possible :smirk:

1 Like

How can i put like, some kind of a health to break the part?

1 Like

Holy smokes I was just browsing through the dev form when I found this. I will definitely be putting this to good use in my own project

1 Like