shown in other instead.
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
- 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.
In the Node tab of the Parameters window, you can adjust the following parameters of Switcher: