How to make the buildings close to the ground?

Hi!

There is a gap between the building and ground. Because I have hundreds of buildings and it’s quite a lot work if I adjust them each by each. And the ground is not plane. So how can I adjust the buildings attaching their locations by unified scripts or something else?

You could select them all in the Hierarchy and move them all down at the same time using the Transform tool (the one with the arrows).

If they’ve come from a prefab, it should be possible to write a script that will work in the editor and just lower the building to the ground, using a raycast.

Give them rigidbodies

There’s a free script to drop stuff to the ground here:

http://forum.unity3d.com/threads/38186-Here-is-an-Editor-Script-to-Help-Place-Objects-on-Ground

Or you could save yourself some time with one of the following :

SceneMate
$10


PlayEditor.
$55

Note that this extension has a snap to terrain feature (watch the video above).

Also get this extension if you do a lot of terrain editing after you placed your buildings :

Terrain Anchors
$5



Snap I’mdabaws - Fantastic answers. I didn’t know that stuff existed.
Gigi

Me neither, definitely going to look at these!

“Play Editor”
Yikes, I’m RUNNING to get this one!