bm803 Terrain Level

Objects


 

bm803   terrain level

  bm812   horizontal coordinate

  bm813   vertical coordinate

 

By means of the terrain level function the terrain height in a certain point can easily be found. The function uses the terrain from picture or the terrain from sheet that was set as an active object for the last time. The terrain itself need not be an active object.

 

As parameters of this function horizontal and vertical coordinates of the terrain point are specified. If no parameters are specified, then the actual camera position is used, i.e. the „translation in X direction“ and „translation in Z direction“ parameters. Possible camera connection to another object is not envisaged. The function detracts the X and Z terrain translation from the coordinates specified, and divides them by the X and Z terrain scale. Possible terrain connection to another object or terrain rotation are not envisaged. The point coordinates are modified by the modulo operation, as if the terrain were laid repeatedly, the individual terrains being situated next to one another. The terrain height detected is multiplied by the terrain Y scale and the terrain Y translation is added.