How to keep objects on the terrain? First of all, I'm actually making a fictional race track mod for a racing simulator, and I already finished the main terrain modelisation and now I'm having some other issues.

One of them is: How to make a separate object respect (snap to) the elevation of the terrain?



Like the screen shot above, I started to make circuit fences using the array modifier, but the pieces of the fence don't automatically match the terrain.
Some constrains may help, but they seem to only be useful in specific situations with simple objects. Is there a easier solution to make the objects match the terrain elevations?
The Shrinkwrap modifier is probably what you're looking for. It has a mode called &quot;Project&quot; that will just translate the objects along one axis until it reaches the target.
You probably won't be able to use the Shrinkwrap modifier on the fences themselves, though. You'll probably have to create a strip of edges that goes on the ground where you want the fence to be (you can make it not renderable, so it doesn't show up). Then you'd use the Shrinkwrap on that to make it stick to the terrain. Then you'd use Dupliverts to make a fence piece on each vertex of that strip.
There may be a simpler solution. I hope this idea will get the creative juices flowing...
From the Manual on Shrinkwrap:

The Shrinkwrap modifier allows an object to “shrink” to the surface of another object. It moves each vertex of the object being modified to the closest position on the surface of the given mesh (using one of the three methods available).


From the Manual on Dupliverts:

Duplication Vertices or DupliVerts is the duplication of a base object at the location of the vertices of a mesh. In other words, when using DupliVerts on a mesh, an instance of the base object is placed on every vertex of the mesh.