Unity3D - Fishpitt Building Script
A work in progress for almost a year, the script was created to handle all foreseeable building actions, from the click-to-spawn, construction and destruction of buildings, this script handles it all. In addition to just visually building a piece in front of your eyes, there are options to allow for physics to kick in on the subobjects, you can randomise objects, think of a palisade fence, not all stakes are the same height, width and angled in the same way. This takes the responsibility of creation large numbers of models off your hand. Create one, a 'perfect' wall, apply the script, and the fence will be randomised, looking more natural.
Video:
In this video, we see a tower, build from 3 instances of a model, layered on top of each other. The individual bricks are all set to allow physics to act on them.
When hit by a projectile, the weights shift, and the structure integrity is compomised, and it comes crashing down.