This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Полезные советы
Программирование на C#
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров узла
Setting Up Materials
Setting Up Properties
Освещение
Landscape Tool
Sandworm (Experimental)
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
Sound Objects
Pathfinding Objects
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
UnigineScript
C++
C#
Унифицированный язык шейдеров UUSL
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Switcher

A switcher is an object that disables or enables its child nodes at the specified distance to the camera. Possible use cases are:

  • Enabling one object and disabling another at a specified distance
  • Disabling an object while moving away
  • Enabling an object while approaching

Each object is composed of a switcher and two spheres of different colors

See Also#

Adding a Switcher#

To add a switcher to the scene via UnigineEditor, do the following:

  1. Run the project with UnigineEditor.
  2. On the Menu bar, click Create -> Optimization -> Switcher.

  3. Place the object somewhere in the world.
  4. Make the object that will be controlled by the switcher the child of the latter.
  5. Specify enabling / disabling distances in the switcher parameters.

Switching between Two Objects#

To switch between two object at the specified distance (like shown at the picture above), do the following:

  1. Create a node dummy for convenient grouping.
  2. Make the first switcher the child of the node dummy.
  3. Make the first object the child of the first switcher and specify its maximum visibility distance.
  4. Make the second switcher the child of the node dummy.
  5. Make the second object the child of the second switcher and specify its minimum visibility distance.

    Notice
    For objects to be switched at the same point, the maximum visibility distance of the first and minimum visibility distance of the second should match.

Switcher Parameters#

In the Node tab of the Parameters window, you can adjust the following parameters of the switcher:

Node tab of the World Switcher node
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: 24.11.2020
Build: ()