TerrainRampPreview

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

A TerrainRampPreview shows a ramp before it is made: the outline of a rectangle from the ramp's start to its end, as wide as the brush, at the heights the ramp will have, so a sloping outline shows the slope. It is green, with a black edge, so it shows on light and dark ground. Call Place whenever the ramp's end or width changes. Its mesh is made once and then updated in place, as TerrainBrushPreview's is. It doesn't cast shadows.

Example Code

use Libraries.Game.Graphics.Worlds.TerrainRampPreview

TerrainRampPreview preview
preview:Place(0, 0, 2, 20, 0, 8, 4)

Actions

Place(number startX, number startZ, number startHeight, number endX, number endZ, number endHeight, number halfWidth)

This action places the outline from a ramp's start to its end.

Parameters

  • startX number: The ramp's start along x, in world units.
  • startZ number: The ramp's start along z, in world units.
  • startHeight number: The ramp's height at its start.
  • endX number: The ramp's end along x, in world units.
  • endZ number: The ramp's end along z, in world units.
  • endHeight number: The ramp's height at its end.
  • halfWidth number: Half the ramp's width, in world units, such as the brush's size.

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