Tutorial Index

Align Meshes To The Slope Of The Terrain

In this tutorial you will learn how to align meshes to the slope of the terrain.  For instance, when placing blades of grass, a bush, or even a rock, it is convenient to have an automatic method to rotate the object so that it correctly sits on the hill based on the hill's slope.

      
Barrel sitting normally on hill.                                      Barrel aligned to the slope of the hill.

First select the object you wish to align to the slope of the terrain.  Make sure it is sitting right on the terrain.  You can use the Place Selection On Terrain toolbar button to do this.

Next click the Align to Slope toolbar button, .  The object will then be aligned to the slope of the terrain.

You can do this with many objects at the same time.  Simply select an entire group of objects, make sure they are all placed on the terrain, and click the Align to Slope button.

NOTE:  In the event that the object does not align correctly, it may be necessary to reset the Local Rotation and World Rotation matrices.  This can be done through the Properties View when the mesh is selected.

      


Copyright 2005 Soconne Inc.

terrain editor world editor terrain heightmap opengl directx game programming C++ terrain generator terrain editor editor farcry games developmen