Switcher
Switcher is an object that disables or enables its child nodes at a specified distance from 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 Switcher and two spheres of different colors
See Also#
- The WorldSwitcher class to manage Switcher via API
Adding a Switcher#
To add Switcher to the scene via UnigineEditor, do the following:
Switching between Two Objects#
To switch between two object at the specified distance (like shown in the picture above), do the following:
- Create a Node Dummy for convenient grouping.
- Make the first Switcher the child of the Node Dummy.
- Make the first object the child of the first Switcher and specify its maximum visibility distance.
- Make the second Switcher the child of the Node Dummy.
- Make the second object the child of the second Switcher and specify its minimum visibility distance.
To make objects switch at the same point, the maximum visibility distance of the first one and minimum visibility distance of the second one should match.
Switcher Parameters#
In the Node tab of the Parameters window, you can adjust the following parameters of Switcher:
Node tab of the WorldSwitcher node
Last update:
2021-12-13
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)