TerrainGridPatch

Package: Libraries.Interface.Controls.Scenes.Items · Inherits from: Libraries.Interface.Item3D, Libraries.Interface.Item, Libraries.Language.Object, Libraries.Game.Graphics.Model

The TerrainGridPatch is the scene editor's grid on a terrain: thin lines on the grid's units, laid over the ground around the terrain cursor and following its hills, a few squares out each way. The arrow keys step the cursor along these lines. It is an editor helper, not a scene item, and lets clicks through.

Example Code

use Libraries.Interface.Controls.Scenes.Items.TerrainGridPatch
use Libraries.Game.Graphics.Worlds.TerrainData

TerrainData data
TerrainGridPatch patch
patch:Place(data, 10, 20, 1, 4)

Actions

Place(Libraries.Game.Graphics.Worlds.TerrainData data, number centerX, number centerZ, number unit, integer squaresOut)

This action lays the grid's lines over the ground around a point: the lines on the grid units nearest it, a number of squares out each way, each following the ground.

Parameters

  • data Libraries.Game.Graphics.Worlds.TerrainData: The terrain's data
  • centerX number: The middle along x, such as the terrain cursor's
  • centerZ number: The middle along z
  • unit number: The grid's unit, in world units
  • squaresOut integer: How many squares out from the middle, each way

Refresh(Libraries.Game.Graphics.Worlds.TerrainData data)

This action makes the patch's mesh again after the ground under it changed, such as after sculpting.

Parameters

Inherited Actions

112 actions from Libraries.Game.Graphics.Model
62 actions from Libraries.Interface.Item
211 actions from Libraries.Interface.Item3D
3 actions from Libraries.Language.Object