Roblox Destruction. Collateral Damage

I wanna make it so structures can collapse under their own weight if there isn’t enough support, but I’m just completely lost. Just any tips would do. I’ll provide a example with a image.

Thanks for reading!

2 Likes

Weld all Parts to another and disable Anchored. You can then break joints(and welds with explosions or manual scripts. It should behave like natural disasters.

Hey. Really interesting stuff.
If you want to avoid unanchorism, I suggest writing an algorithm that can detect whatever is grounded and whether a part is welded to said grounded part, and if it’s not or too far, simply create a rupture after said distance threshold. Just a simple idea, I’m not a physician. Have fun.

3 Likes

This response is really useful. Thanks!

1 Like

My naive solution—never having attempted this before—would be to calculate the amount of force on each constraint between each part and determine if it’s over a threshold. If it is, then you break that constraint. That’s a really complicated and slow option, though, especially since Roblox doesn’t track any of that data for you; you’d need to do your own force calculation just using Touched, as far as I know.

For a faster hack, maybe a progressive sum all of the parts above the sum of ground-contacting parts, and when the sum reaches past a threshold based on ground-contacting parts, then you break along the outer edges of all the summed parts. Basically graph traversal but with a length limit based on how many nodes you start with.

2 Likes

By constraint I assume you mean welds, actually it would be possible to calculate the strength put into one.

ElasticityWeight rises as the material is softer essentialy giving an option to calculate how well two parts would bind together.
Density combined with the Velocity could indicate how much stress would undergo, and if there’s a clear mismatch or it exceeds a resistance amount given by the property above the weld will break.

Brainstorming again :sweat_smile: we’re not physicians.
Have fun with your project!

1 Like