UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials

Switcher

A switcher is a cuboid shaped object, switching off (or turning on) all of the nodes inside of it immediately.

Notice
A world switcher should be a parent node for the nodes it controls.

See also

Creating a Switcher

To create a world switcher, choose the Add World Switcher option in the list of nodes in Editor panel. In the creation dialog window, specify initial parameters:

A Creation Window
Point A flag, indicating if the distance to the object is counted from the bounding box center (if disabled, the distance will be counted from its nearest edge).
Size The size of the switcher's bounding box along the X, Y and Z axes, in units.

After the initial parameters are set, click Ok and place the world switcher somewhere in the world.

Editing a Switcher

In the Switcher tab you can adjust the following parameters of the switcher:

A Switcher tab

Bounding Box Parameters

A set of bounding box parameters:

Point A flag, indicating if the distance to the object is counted from the center of the bounding box (if disabled, the distance will be counted from its nearest edge).
Size The size of the switcher's bounding box along the X, Y and Z axes, in units.
Offset The offset of the switcher's bounding box along the X, Y and Z axes, in units.

Switching Off Parameters

Switching of distances:

Min distance The minimum distance of visibility, in units. If a camera is closer to a node than this minimum distance, a node is not visible.
Max distance The maximum distance of visibility, in units. If a camera is further from a node than this maximum distance, a node is not visible.
Last update: 2017-07-03