r/Unity3D•
yester30

How to use physics to determine if things break?

Question

I'd like to set up a realtime simulation of physics forces that tests for structural integrity (e.g. A big heavy stone on 4 wood pillars, start the simulation : does it hold? or which pillar breaks first? .. Or which part of a cement+bricks wall gets shattered if I throw a cannonball at it, if any, considering the solidity of the bricks & the force of the cement?)

Most physics implementations I saw (native Unity & elsewhere) are used to manage the movement & collision of debris that were predetermined by hand or with mesh shards code, and just wait to be 'released'. Or wall are made with stacked blocks with no glue between them at all, just heavy blocks.

I just want to know : does it break, and how? Basically the user builds with elements and choses thickness & materials of each of them, and the simulation tests it.

A similar example I can think of are those bridge building minigames where forces on each beam are computed in realtime & once the force is too strong the joints break.

The simulation could be run at some specific points only, I don't need it in the background of scenes. Also some precomputation would be acceptable in my context. I'm all for coding that myself, but I'd like to know if anyone already had a go at that topic?

Posted Nov 10, 2015, 2:54 PM UTC · edited

75
Loading comments…