TerrainCursorBeam

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

The TerrainCursorBeam is a column of light rising from a scene editor's terrain cursor, so the cursor can be found from far away. Like a lightsaber, it has a white core, a pale band of its color around that, and a glow of its color that rolls off smoothly to nothing; it fades toward its top and ends softly. It is one flat strip that turns to face the camera, with a texture made from the settings, so its edges are smooth at any zoom. Its width is set in screen terms, from the camera's distance. It is an editor helper, not a scene item: it isn't saved, listed or picked, and lets clicks through.

Example Code

use Libraries.Interface.Controls.Scenes.Items.TerrainCursorBeam
use Libraries.Interface.Controls.Scenes.TerrainCursorSettings
use Libraries.Compute.Vector3

TerrainCursorSettings settings
TerrainCursorBeam beam
Vector3 eye
eye:Set(0, 30, -40)
beam:Place(10, 2, 20, eye, 50, settings)
beam:Recolor(settings, 1)

Actions

Place(number x, number ground, number z, Libraries.Compute.Vector3 eye, number distance, Libraries.Interface.Controls.Scenes.TerrainCursorSettings settings)

This action puts the beam's foot at a place on the ground, sizes it for the camera's distance, and turns it to face the camera.

Parameters

Recolor(Libraries.Interface.Controls.Scenes.TerrainCursorSettings settings, number pulse)

This action makes the texture again if a setting changed, and sets how strong the beam is now, from 0 to 1, for pulsing.

Parameters

SetSpread(number spread)

This action widens or narrows the beam around its middle without building it again, for breathing: 1 is its usual width.

Parameters

  • spread number: How wide, as a share of its usual width

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