- Home /
Structural Stability
Hey there,
Doing some experimenting with destructible buildings. Just wondering if anyone has some pointers in how to check the stability of a structure. I've thought of just looking at how many walls the place has and once a certain percentage are destroyed bring the whole thing down, but i feel that could lead to various bugs such as walls hanging in the air with no support. Any ideas on a lightweight method of doing this?
Cheers
I like your idea. To fix the issue of floating walls, make a wall collapse if it isn't in contact with any surrounding walls. Basically have each wall shoot out a ray on all 4 sides. If it doesn't touch anything with in a certain distance, then no walls are next to it, and it should either be destroyed or fall down or whatever you want it to do.
hmm how could i do this without using a huge amount of resources. Surely if every wall is shooting 4 rays regularly it will cause some serious lag.
You could have it only use the rays when an object is destroyed. You could slim line it even further by having the wall that is about to be destroyed trigger all the walls around it to use their rays before the wall is destroyed. Then only a maximum of 8 walls could possibly use rays at the same time. So 32 rays max, which shouldn't be too bad.
Your answer
Follow this Question
Related Questions
Destructible tank? 1 Answer
Destroy a wall 2 Answers
how to break with a big mass 0 Answers
Ice Ball Break Effect? 1 Answer
Why can't I build Web Player in Unity while I have no problems with building standalone versions? 2 Answers